473,830 Members | 2,135 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Databinding child table, bindingnavigato r 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 BindingNavigato r.

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 bindingNavigato r perform its default action before the rest of the bindingNavigato r1_ItemClicked function is performed.

Thanks.

Chuck Gantz

private void bindingNavigato r1_ItemClicked( object sender, ToolStripItemCl ickedEventArgs e)

{

flowLayoutPanel 1.Controls.Clea r();

int cnt = testTypeBinding Source.List.Cou nt;

//nameTextBox1.Te xt = ((BBTB.TestRow) ((DataRowView)( testBindingSour ce.CurrencyMana ger.)).Row).nam e;

foreach (object row in testTypeBinding Source.List)

{

TestTypeControl ttCtl = new TestTypeControl ();

ttCtl.Parent = flowLayoutPanel 1;

ttCtl.TestTypeN ame = ((BBTB.TestType Row)((DataRowVi ew)row).Row).na me;

}

}

Jan 7 '06 #1
0 1114

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

Similar topics

1
1370
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 update data. The databinding is failing too. I traced down the issue to this particular class by manual debugging. I could also see a similar unanswered post in the same newsgroup :
0
272
by: Jacek Jurkowski | last post by:
public class Xxx { private string tableName = "" public string TableName { get{return this.tableName;} set { if(value != null)
0
913
by: Jacek Jurkowski | last post by:
public class Xxx { private string tableName = "" public string TableName { get{return this.tableName;} set { if(value != null)
5
4352
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 trouble to bind relation into another combo box. DotNet does not give me a run time error. But it did not perform the way I am expecting. Thanks in advance DK
3
3168
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, depending on which menu item a user selects. Each of these controls follows the same basic pattern: Get a dataset from the database and then display the results using basic databinding. Everything works fine except that I'll occaisionally get an...
2
4273
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 for the repost. I'd like to make use of the asp:Wizard control to present a step-by-step guided experience for my user to fill out a complicated data-entry form. I'd like to make use of two-way databinding provided by the asp:FormView control...
0
965
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?? Thanks, --max I added a table (logouts) to a form from the datasource. This added the LogoutsBindingNavigator, LogoutsBindingSource, and LogoutTableAdapter. This is all find and dandy, now I want to find a record without scrolling to the record....
3
18935
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 database. I have a dataset in which a parameterized query returns the correct result set in the forms of a tableadapter and a bindingnavigator. In other words, I can perform my query and see that the tableadapter and bindingnavigator contain...
0
2293
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 combobox B. The combo boxes are bound to separate tables (e.g. state and city tables). For example, A might be State, and B might be City. Select a State, and the City list changes. I have gotten most of it done, but I have run into some snags. ...
0
9642
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
10771
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
10487
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10525
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10202
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9313
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...
1
7745
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5780
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3958
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.