Connect Text Boxes on Form2 to dataGrid on Form1

E

esroinc

Have Form1 with dataGrid and text boxes bound to a dataset. This works
fine. Want to bring up another form (Form2) with text boxes to edit
the dataset. Using "this.textBox1.DataBindings.Add("Text",
classinstanceForm1.ds, NamesAddresses.FirstName"); will put the first
record in the database table in the text box, but will not put the
dataGrid selected record on Form1 in the Form2 text box. Need to
associate the text boxes on Form2 with the text boxes and dataGrid
selection on Form1.
 
J

Jeff Johnson

Have Form1 with dataGrid and text boxes bound to a dataset. This works
fine. Want to bring up another form (Form2) with text boxes to edit
the dataset. Using "this.textBox1.DataBindings.Add("Text",
classinstanceForm1.ds, NamesAddresses.FirstName"); will put the first
record in the database table in the text box, but will not put the
dataGrid selected record on Form1 in the Form2 text box. Need to
associate the text boxes on Form2 with the text boxes and dataGrid
selection on Form1.

I don't think you can do it, but then again I personally despise data
binding and code everything by hand, so I may not know the "tricks."
Ultimately, though, I think you're just going to have to manually update the
data source from the information you gather in Form2. No idea how you're
going to do that, though.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top