how to convert a column in gridview to combobox after binding??
-
I use linq to sql. I have a table of employees belong to a company by forigen key as companyID on the employees table. (I have compamies table as my main table) the linq does it by it's self and knows that the two are related and after binding the context to the datagridview I get the employees table + column of the company name. my goal is to convert or some how get to the point where I have a coulmn of the employee name and a combobox coulmn of the company which will be bound the companyID. so when I change the company it will know to update the companyID when I submit_changes() on linq context. tnx
-
I use linq to sql. I have a table of employees belong to a company by forigen key as companyID on the employees table. (I have compamies table as my main table) the linq does it by it's self and knows that the two are related and after binding the context to the datagridview I get the employees table + column of the company name. my goal is to convert or some how get to the point where I have a coulmn of the employee name and a combobox coulmn of the company which will be bound the companyID. so when I change the company it will know to update the companyID when I submit_changes() on linq context. tnx
DataPropertyName I added a new combobox column during runtime and bound it to the companies table. set the valuemember and displaymember, and defined DataPropertyName to the same column name as the one I need it to be bound to and vwalla... any changes made to the combobox saves it automaticly to the database (need to add an event on cell changes the have the context submit_changes() function)