We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

data binding questions

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.

4 Replies

CB Clay Burch Syncfusion Team September 20, 2002 05:26 AM UTC

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 1.0.2.4. 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.


AK Amanda Kabak September 20, 2002 10:10 AM UTC

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.


AK Amanda Kabak September 20, 2002 10:14 AM UTC

Oops. Think I just figured it out. The little extra options button next to the GridBoundColumns, right?


CB Clay Burch Syncfusion Team September 20, 2002 01:27 PM UTC

Yes, that's it....

Loader.
Live Chat Icon For mobile
Up arrow icon