datagridview combobox column (dynamically loading values)
I need to display a datagridview with one of the columns being a combobox. I have done it before, but this time each row's combobox column needs to have their own values based on the results from a stored procedure. I am unsure how to set up the grid to run the stored procedure for each row, using (for example) cell1 and cell2 as parameters to populate cell3(combobox) of the datagridview.
Help please!
[420 byte] By [
bjswift] at [2007-11-20 10:10:50]

# 1 Re: datagridview combobox column (dynamically loading values)
After some more searching on the web, I figured it out. Basically, I decided to add the rows of the datagrid row by row using a data reader, instead of binding it in design time. This way, for each row I am able to create a comboBoxCell object, giving it a data source display member and value member. The source is just the results from a tableAdapter using the .getData method set up in design time, using parameters of the row I am currently adding.
This works, there might be a better way, but still it works :)