Though my company bought your product a few months ago now, I'm finally having a moment or two to start playing around with them. I have no problem binding a dataset to a grid, displaying the columns I want and specifying the headers for each column. However, I am having some problems binding a different dataset to combo boxes I want to use for each cell in a certain column.
Right now I have this code to bind the list dataset to the combo boxes in the 3rd column of the grid:
GridDataBoundGrid1.Model.ColStyles(3).CellType = "ComboBox"
GridDataBoundGrid1.Model.ColStyles(3).DataSource = dsList.Tables("Programs")
GridDataBoundGrid1.Model.ColStyles(3).DisplayMember = "strProgram"
GridDataBoundGrid1.Model.ColStyles(3).ValueMember = "intProgramID"
I saw in an earlier post that there was a datagrid combo box sample, but I can't find it in the sample projects installed on my system.
Any help is appreciated.
CBClay Burch Syncfusion Team September 20, 2002 01:26 AM
The name of the sample is GDBGcombos. If you do not see it in your Samples folder, then I suspect you are using a release prior to the 184.108.40.206. You should install this release, and try your code there. I think your code will work OK provided you are not binding the GridDataBoundGrid to the same dsList.Tables("Programs") table as the ComboBox.
AKAmanda KabakSeptember 20, 2002 06:10 AM
You're absolutely right that I didn't have the latest version installed. I see the grid combo sample now, but I'm confused about one thing: in the description for the sample, it states that everything except filling and updating the dataset was done in the designer instead of in code, but I can't figure out a way to change columns in the data bound grid control while in the designer. I've only been able to do it in code, and I don't see any instructions to do it otherwise. I've tried right-clicking, double-clicking, clicking with one hand tied behind my back. :)
Any tips would be appreciated. Thanks.
AKAmanda KabakSeptember 20, 2002 06:14 AM
Oops. Think I just figured it out. The little extra options button next to the GridBoundColumns, right?
CBClay Burch Syncfusion Team September 20, 2002 09:27 AM