I have a window form, in which there are a no of textboxes, other control and a datagrid view
.
Datagrid view have 3 column. one colume is bind with combobox
and two other with textboxes.
Data comes in combobox is bind from a table. Table name is account table.On Button click, Data saved in two tables.
Both table name is Register table
and detail table
.There is 1 to many relationship between Register
and detail table
Normal textboxes and other controls data save in Register table and datagridview data i.e combobox and two textboxes data save in detail table.All things is going well on insert button click.
When we comes on that window form for edit/update data. Then we fetch data from both tables. all data is shown correctly in their respected controls. But the combobox within datagridview is not showing selected data where as two textboxes within gridview also shown correct data.
My problem is that how to show selected column data from detail table in combobox list which is bind with Account table.
One more thing i want to tell that i insert account name not account id in detail table during inserting process. That is the problem