473,809 Members | 2,710 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

BindingContext Position problem

I have a simple datagrid on a form. I used the wizard to create the
form. I have navigation buttons that I made myself.. This is the next
button:
Me.BindingConte xt(objSeasonsDS , "Seasons").Posi tion =
(Me.BindingCont ext(objSeasonsD S, "Seasons").Posi tion + 1)
The position is always 0. If I hit the next button, it becomes 1, then
when I hit it again, it's back to 0 and gets set to 1 again. The
(objSeasonsDS.T ables("Seasons" ).Rows.Count is set to the total number of
records. (currently 4)

The grid has only one column, as there is only one field in the table.
The primary Key is set on that field... All the other forms I made with
the wizard works as they are all set up primarily the same way..

Thanks,
Aaron

--
---
Aaron Smith
Remove -1- to E-Mail me. Spam Sucks.
Nov 21 '05 #1
2 2913
Nevermind. Found it. :-/

Aaron Smith wrote:
I have a simple datagrid on a form. I used the wizard to create the
form. I have navigation buttons that I made myself.. This is the next
button:
Me.BindingConte xt(objSeasonsDS , "Seasons").Posi tion =
(Me.BindingCont ext(objSeasonsD S, "Seasons").Posi tion + 1)
The position is always 0. If I hit the next button, it becomes 1, then
when I hit it again, it's back to 0 and gets set to 1 again. The
(objSeasonsDS.T ables("Seasons" ).Rows.Count is set to the total number of
records. (currently 4)

The grid has only one column, as there is only one field in the table.
The primary Key is set on that field... All the other forms I made with
the wizard works as they are all set up primarily the same way..

Thanks,
Aaron

--
---
Aaron Smith
Remove -1- to E-Mail me. Spam Sucks.
Nov 21 '05 #2
Problem found by Arron himself, just to prevent opening by others than
Aaron, thinking it is an addition.

Cor
Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2029
by: Rakesh | last post by:
Using the BindingContext we will be able to find the actual position of the row selected in a DataView (regardless of the sort used). What I want to do is exactly the reverse. That is, I know the actual position of the row in the BindingContext, and from that I want to know the position of the same in a dataview/datagrid. Is this possible? The reason why I want to do this is becuase of the
1
1596
by: Sergio Florez M. | last post by:
I have a windows form with a bunch of textboxes, comboboxes and three datagrids. My dataset has 4 tables and the necesary relations. Basically it's a master page with three detail grids. My problem is that when I move the position of the BindingContext the datagrids reflect the change but the textboxes and comboboxes don't. -- El que persevera insiste Sergio Florez M. Medellín, Colombia
1
3323
by: D. Yates | last post by:
Hi, I retrieved the employee table from the Pubs database into a single dataset called, dataSet12. I dropped two textbox controls and a datagrid control onto the same form and bound the controls at design time to dataSet12's employee table. Now I want to move through the data by pressing a button.... This code will change the data in the text boxes: this.BindingContext.Position += 1;
2
1641
by: John Celmer | last post by:
Can someone please help me with my code. I have a datasetX with two tables, tableA and tableB in the datasetX. The tables have a DataRelation named A_B_Relation. How can I get the BindingManagerBase to be a Currency Manager so that I can get the current position when there is movement in dataGrid1. This is my code: // set up the binding contexts for Master/Detail grids dataGrid1->DataSource = datasetX; dataGrid1->DataMember =...
1
7575
by: Edwin | last post by:
Hi, I created a dataform with the data form wizard which created some textboxes and 1 checkbox. When I add a row (see section "Add Row" for code) the newly added is not accessible. A label "lblNavLocation" generated by the wizard shows that a row has been added but I can not navigate to it. See section "PositionChanged" for code.
0
1399
by: nina98765 | last post by:
Hi all I have a data-bound Windows form bound to a strongly-typed dataset. Upon opening the form, I would like to Find a specific record based on a parameter I've passed to the form, and display the data in the appropriate textboxes, etc. I would also like to have the entire table opened (i.e., not just the one record I've found) as I would like to navigate through the records My table is called "AP_TBL_Vendors. The problem is that I...
0
1443
by: graham | last post by:
Hi there, Can anyone help me with a definitive solution to the problem I have. I know this is much revisitied ground, and I have read a number of articles.. but I still can;t get this binding to work. Let me explain... I have a form which displays records from a dataset in a textboxes.
6
2252
by: Aaron Smith | last post by:
I have a form, oddly enough the same one with the expression column that is giving me a headache, and on this form I have a dataset that has a couple of tables in it that are related. If I do a AddNew on the Binding Context for the parent, it doesn't seem to work. If I click the new (just does an addnew, and thats it) the fields do not clear out, and if I click new again, it just says that the first field that doesn't allow nulls, doesn't...
6
12144
by: MeowCow | last post by:
I have created a UserControl that encapsulates a third party data grid. My goal was to create my own DataSource and DataMember properties that forward the binding to the third party grid, then use binding like normal. The problem I am running into is that my UserControl ends up with a different BindingContext then the ParentForm it is contained in and thus all other controls on the parent form. (I want various controls on the form to...
0
9721
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9603
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10640
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9200
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5689
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4332
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.