First of all sorry to everyone for my bad english but I will try to explain the situation in the best way I can.
The scenario it's one database with 3 tables, table1 with ID and Description, table2 with ID and Description, table3 it's build like that:
ID, IDtable1, description, value, IDtable2, IDtable2_1, date, timestamp
In my form I have a Datagridview binded with the bindingsource connected to table3, as well as a bindingnavigator and some textbox.
The view on Datagridview it's little particular becuase I never show the IDTable1 or IDtable2 or IDtable2_1 but instead from the sql join expression I put the description corresponding to the IDs.
On the upper part near the textbox I put 3 combobox, they have to be binded to the same bindingsource as datagridview but they must be filled with the content of table1 table2 and table2_1 so if I select the first value of combobox1 they show me text as text1 and value as id1.
The problem is here, I am not able to execute a binding of my combobox in that way, as per example if I press on bindingnavigator the betton for ADDNEW record on datagridview I starting with the problem, I can add the new record and choose the right value from the combobox but when I press the save button and everything finish on the database on the datagridview the value added to the datarow seems to be only the textbox and checkbox binded to the table3 but the value from combobox1 combobox2 and combobox3 never saved on the datarow (but if I check the database the ID corresponding to the select I make it's saved correctly but the datarow never update with the currect description connected to the ID) The same if I edit the row, if I choose the value on Combobox they never update the description on the datagridview but it's everything saved correctly to the database, so how can I solve the problem ???? Is there a way to solve that kind of problem or is better to fill combobox in different way maybe with a reader ???
for each table 1 table 2 and table 3 I have a different dataset, a different dataadapter and a different bindingsource, maybe it's better to use the datarelation that I never used ???
Thanks in advance for any help.
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).