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

GridDataBoundGrid GridBoundColumn ValueMember base64binary

Hi, I''ve two tables: ------------------------------ TBL_PRODUCT CODE : varchar(10) NAME : varchar(256) CATEGORY_CODE : binary(8) ------------------------------ TBL_CATEGORY CODE :binary(8) NAME :varchar(128) ------------------------------ I created a DataTable for each DBTable in a Dataset and set my GridDataBoundGrid datasource "dataset.TBL_PRODUCT". Then I created the GridBoundColumns, for the CATEGORY_CODE field I set the properties like that: col_CATEGORY.MappingName = CATEGORY_CODE; col_CATEGORY.StyleInfo.CellType = "ComboBox"; col_CATEGORY.StyleInfo.DataSource = TBL_CATEGORY; col_CATEGORY.StyleInfo.DisplayMem = NAME; col_CATEGORY.StyleInfo.ValueMember= CODE; When I run the application the CategoryCombo gets filled by the categories; but when I select a Category and leave the combo cell, the Category field restores; and my selection dissapears. Is there a problem about "binary column mappings"?? One more fact about this situation is that; when I use the VSDesigner to define the GridBoundColumns, it does not let me choose the CODE field of TBL_CATEGORY as a "ValueMember".

1 Reply

AD Administrator Syncfusion Team January 21, 2004 04:18 AM

Check the value of TBL_CATEGORY.Columns["Code"].DataType. You must make the GridBoundColumn.StyleInfo.CellValueType for the grid column of the combobox be the same type as the type of the DataCoumn in the DataTable of the combobox''s datasource. If the proper system type is not listed as an option in the designer, then you may have to do this from code.

Loader.
Live Chat Icon For mobile
Up arrow icon