472,982 Members | 2,202 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Databinding with multiple forms

I have a test project consists of two forms. The main form contains a
datagrid and a button. On click of button I populate the datagrid with
a ds.table(0) so far so good and on grid's doublick event I bring up
the sub-form which contains controls such as text boxes, lookup, etc.
I can open the sub-form multiple times depending on the doubleclick of
the datagrid. I'm using databinding to bind controls in the sub-form.

on doubleclick event of datagrid ....
Dim frmsubform As New frmSub

frmsubform.txtAppNum.DataBindings.Add(New Binding("Text",
ds.Tables(0), "App"))
frmsubform.cbAppStatus.DataBindings.Add(New Binding("Text",
ds.Tables(0), "Status"))

The problem I'm having is that let's say I have 3 records in the
datagrid and I open the 1st record in the subform and then the 3rd
record in the subform. Now I have 2 sub forms showing records 1 & 3
but if click on 1st sub form and go back to 2nd sub form then both
forms have the identical recordset. How can I keep multiple subforms
with different records using databindings. Thanks in advance.


Apr 24 '07 #1
1 1242
Forgot to update. Solved the issue by using another dateset.

Apr 26 '07 #2

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

Similar topics

by: Ben R. | last post by:
Hi, I'm fairly familiar with the databinding model for ASP.NET, but now I'm trying to do the same with a C# windows forms application. I'm noticing several differences: Firstly, there never...
by: dtblankenship | last post by:
Hello everyone, I know this question has been asked many times in the forums, and after spending a few days reading, I am still confused as to the answer. I have a ListBox (lstBox),...
by: John Bailey | last post by:
When I first built a few web pages in ASP .Net 2.0, I thought it was great. The formview and detailview contorls would automatically layout the controls for you, the update methods were...
by: Tom McLaughlin | last post by:
I am new to vb.net and I am running into problems understanding DataBinding and its concept. The only examples I find are always talk about Web design, I only want to use this data on my...
by: pmcguire | last post by:
Can someone explain to me the difference between these two bindings? dim b as Binding b=New Binding(dsMyDataset.tblMyTable, "colMyColumn") b=New Binding(dsMyDataset,...
by: Alec MacLean | last post by:
Hi everyone, I have a ComboBox that when changed, calls a method to change the content of a ListBox. I'm also using the Listbox's SelectedIndexChanged event to change other control values on...
by: GaryDean | last post by:
We have been noticing that questions on vs.2005/2.0 don't appear to get much in answers so I'm reposting some questions posted by some of the programmers here in our organization that never got...
by: =?Utf-8?B?R29rdWw=?= | last post by:
I am struck up with a problem and want anyone here to help me out. I am a beginner in .NET trying to learng DataBinding concepts. I have binded 4 text boxes with a dataset but when I say...
by: Nathan Sokalski | last post by:
I have a Repeater that uses a DataSource that has multiple fields. When the values of these fields is displayed in the Repeater, there are fields that are used in combination with other fields as...
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.