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.
Unfortunately, activation email could not send to your email. Please try again.

CheckBox CellType...State dose not change at runtime..

Thread ID:

Created:

Updated:

Platform:

Replies:

11162 Feb 25,2004 07:34 AM Feb 26,2004 04:01 AM Windows Forms 3
loading
Tags: GridControl
Samir
Asked On February 25, 2004 07:34 AM

I Have a Added a Column to the grid that has CellType property set to CheckBox. At runtime the CheckBox showsup in the Grid but when I click it the state of the checkbox dose not change i.e. the checkmark dose not appear, in fact nothing happens. Can anybody help me... My code -- Dim oSelectColumn As New Syncfusion.Windows.Forms.Grid.GridBoundColumn oSelectColumn.HeaderText = "Select" oSelectColumn.StyleInfo.HorizontalAlignment = Syncfusion.Windows.Forms.Grid.GridHorizontalAlignment.Center oSelectColumn.StyleInfo.CellType = "CheckBox" oSelectColumn.StyleInfo.CheckBoxOptions = New GridCheckBoxCellInfo("True", "False", "", False) oSelectColumn.StyleInfo.CellValue = False oSelectColumn.StyleInfo.TriState = False MaximeyesDataBoundGrid_AddTemplates.GridBoundColumns.Add(oSelectColumn)

Administrator [Syncfusion]
Replied On February 25, 2004 07:56 AM

You did not set oSelectColumn.MappingName. Without this being set, the grid does not know where in your datasource to get/set the values for this column.

Administrator [Syncfusion]
Replied On February 26, 2004 02:26 AM

Hey Clay, Thanks for the Reply....I tried assigning the MappingName property but the problem dose not get solved. Actually the CheckBox at runtime dose not respond to the Click by changing its state. i.e. If the CheckBox is checked I mean if there is a check mark then after clicking over it there should a change in status...should get unchecked and vise-versa which is not happening. Thanks, Samir >You did not set oSelectColumn.MappingName. Without this being set, the grid does not know where in your datasource to get/set the values for this column.

Administrator [Syncfusion]
Replied On February 26, 2004 04:01 AM

Adding the mapping name makes your code work for me in this sample. One other thing to check is exactly what is stored in your database in this column. If it is not a boolean, but instead something like a Y or N, or 1 or 0, then you should change the GridCheckBoxCellInfo to reflect the actual values your datasource has. (To see these actual values, run the project commenting out the line that sets the CellType so the value just shows in the cells).

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;