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.
Syncfusion Feedback

checkbox cell does not work

Thread ID:

Created:

Updated:

Platform:

Replies:

29618 May 30,2005 06:35 PM UTC May 30,2005 07:52 PM UTC Windows Forms 2
loading
Tags: GridControl
Lan Mo
Asked On May 30, 2005 06:35 PM UTC

I have GridGroupingControl form, want to show column "IsSupperSection" as checkbox. "IsSupperSection" column is numeric field (Not a boolean field). I used following code to set the column celltype. The checkbox does not display "CHECKED" for value other than 0; I clike the CheckBox, nothing happens. any idea? // ... load data gdBase.DataSource = mGridDataSet.Tables["MyTable"]; gdBase.TableDescriptor.Columns.LoadDefault(); string ColumnName="IsSupperSection"; this.gdBase.TableDescriptor.Columns.[ColumnName].Appearance.AnyRecordFieldCell.CellType ="CheckBox"; this.gdBase.TableDescriptor.Columns[ColumnName].Appearance.AnyRecordFieldCell.ShowButtons=GridShowButtons.ShowCurrentCell;

Administrator [Syncfusion]
Replied On May 30, 2005 07:10 PM UTC

You will also need to set teh CheckBoxOptions so the grid knows what values you are using for Checked and Unchecked. GridStyleInfo style = this.gridGroupingControl1.TableDescriptor.Columns["check"].Appearance.AnyRecordFieldCell; style.CellType ="CheckBox"; style.CheckBoxOptions = new GridCheckBoxCellInfo("1", "0", "", true); //use 1 and 0 for values

Lan Mo
Replied On May 30, 2005 07:52 PM UTC

Thanks Clay. My code works now. >I have GridGroupingControl form, want to show column "IsSupperSection" as checkbox. "IsSupperSection" column is numeric field (Not a boolean field). I used following code to set the column celltype. The checkbox does not display "CHECKED" for value other than 0; I clike the CheckBox, nothing happens. > >any idea? > > >// ... load data >gdBase.DataSource = mGridDataSet.Tables["MyTable"]; >gdBase.TableDescriptor.Columns.LoadDefault(); >string ColumnName="IsSupperSection"; >this.gdBase.TableDescriptor.Columns.[ColumnName].Appearance.AnyRecordFieldCell.CellType ="CheckBox"; >this.gdBase.TableDescriptor.Columns[ColumnName].Appearance.AnyRecordFieldCell.ShowButtons=GridShowButtons.ShowCurrentCell; >

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.

Warning Icon 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.Close Icon

;