473,396 Members | 1,784 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Databinding child table, bindingnavigator problem

I have a child table (the "TestType" that is in my code below) that I am trying to bind to its parent ("Test" in the code. I've commented out that line below sice it doesn't fix my problem).
The Test table is bound to a BindingNavigator.

Everything displays ok. In other words, when I click the advance or back buttons of the navigator, the nameTextBox1 control shows the correct Test text, and the TestTypeControl (which is my user control) shows the test types. The problem is that TestType gets displayed not for the Test it should be bound to, but for the previous Test. In other words (again), If the test sequence when advancing is Test2, Test3, Test4, etc., the TestType is shown as TestType1, TestType2, TestType3, etc. So it looks like when I click the advance button of the navigator control, the TestType control is bound to the current bindingsource before Test is advanced. What I need is for Test to be advanced first, then TestType to be bound.

So how do I make the bindingNavigator perform its default action before the rest of the bindingNavigator1_ItemClicked function is performed.

Thanks.

Chuck Gantz

private void bindingNavigator1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)

{

flowLayoutPanel1.Controls.Clear();

int cnt = testTypeBindingSource.List.Count;

//nameTextBox1.Text = ((BBTB.TestRow)((DataRowView)(testBindingSource.Cu rrencyManager.)).Row).name;

foreach (object row in testTypeBindingSource.List)

{

TestTypeControl ttCtl = new TestTypeControl();

ttCtl.Parent = flowLayoutPanel1;

ttCtl.TestTypeName = ((BBTB.TestTypeRow)((DataRowView)row).Row).name;

}

}

Jan 7 '06 #1
0 1087

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

Similar topics

1
by: Dotnet Newbie | last post by:
Hi all, I am working on .NET framework 1.1 While binding data to our master table in the database, we are using this System.Data.Relatedview class. But the issue is, it does not appropriately...
0
by: Jacek Jurkowski | last post by:
public class Xxx { private string tableName = "" public string TableName { get{return this.tableName;} set { if(value != null)
0
by: Jacek Jurkowski | last post by:
public class Xxx { private string tableName = "" public string TableName { get{return this.tableName;} set { if(value != null)
5
by: david.kao | last post by:
Hi All: I have a dataset contains two tables, one parent child relation between two tables. I have no trouble to bind parent table to a combobox, relation to a win grid control. But I am having...
3
by: Kevin Swanson | last post by:
I'm writing what should be a very simple app against an Oracle database. The app has a number of user controls, any one of which is loaded into a main display page using the loadControl method,...
2
by: John R. Lewis | last post by:
I posted this yesterday with a different email address. I am reposting with my fake-address as given to me by Microsoft so that I can be guraranteed a response from a support representative. Sorry...
0
by: Max | last post by:
If you don't want to read the drivel in my main message body here is the question at the end. How do you find a string in a column and make the BindingNavigator Navigate to the correct row?? ...
3
by: =?Utf-8?B?UmljaCBIdXRjaGlucw==?= | last post by:
I'm not really sure how to ask this question because I'm still getting my feet wet with data access and VB.NET, but here goes: To start off with, I'm using VB 2005 Express to connect to an Access...
0
by: tschroeder250 | last post by:
Hello All, I am writing a form that allows maintenance of the fields of a table. Two of the controls on the form are comboboxes, where selecting a value in combobox A filters what appears in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.