Windows Develop Bookmark and Share   
 index > Windows Forms General > data grid binding
 

data grid binding

Hi,

I have 40 Mater forms having fields(id,description).Now i created 40 different master forms and saved to individualy to its own tables.I done this using wizard.And the id is hided and descriptions in data grid view.Now what i want is creating a form with one combobox and a datagrid view.And combobox is populating forms name.First of all
data grid's binding source is not binded to any thing.But accoring to the form selected corresponding forms source binding should assign to our datagrid's binding source and i can save the data to that particular forms table.

Thanks elby
  • Moved byEric Smyth - MSFT Tuesday, July 21, 2009 8:05 PMwinform (From:Transactions Programming)
  • Moved byAlicia CalesMSFT, AdministratorWednesday, July 22, 2009 12:32 AMMoving to Windows Forms. Please move is this is not the correct location (From:.NET Framework Networking and Communication)
  •  
Elby Paul  Tuesday, July 21, 2009 7:30 AM
Ok, you have 40 "Master" forms, one other form with combobox and datagridview. The combobox contains the names of the other 40 forms. If a form is selected in the combobox, you want to bind the datagrid in that form to a dataset in the "other" form?

One would think that passing the dataset to the other form would be the best way to do that. But I don't think it will work due to the restrictions of cross thread GUI references.

Try this...
Set the Datagridview accessor to PUBLIC in one of the 40 forms.
When combobox is selected bind the dataset to the datagridview in the other form.
Make sure to include the datamember too.

I'm afraid this won't work. So the question is why wouldn't you have those datagrids bound to their own dataset in that form?
AcousticGuitar  Tuesday, July 21, 2009 10:17 PM

You can use google to search for other answers

Custom Search

More Threads

• saving a Word document in an AxWebBrowser using ExecWB()
• Sorting listView items by Column click WITH each column support toggle ASC/DESC sorting.
• Is there an IE 5.5 UserControl that I can use in my WinForm application?
• Can I change the color of the TABS on my TabControl?
• Control.Invalidate()
• Capturing Transparent Windows on XP.
• Passing KeyPressed events to WinForm not-focus controls...
• WCF Security
• A Simple Form Question Wait For your solutions
• when and how paint event works?