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

ggc as checked listview


I have the ggc behaving like a checked list view using the code below.

this.gridGroupingControl1.DataSource = dt;

this.gridGroupingControl1.TableDescriptor.Appearance.AnyRecordFieldCell.CellType = "Static";
this.gridGroupingControl1.TableOptions.ShowRowHeader = false;
this.gridGroupingControl1.TableDescriptor.AllowNew = false;
this.gridGroupingControl1.TableOptions.ListBoxSelectionMode = SelectionMode.One;
this.gridGroupingControl1.TableOptions.ListBoxSelectionCurrentCellOptions = GridListBoxSelectionCurrentCellOptions.HideCurrentCell;
this.gridGroupingControl1.TableModel.Options.ShowCurrentCellBorderBehavior = GridShowCurrentCellBorder.HideAlways;
this.gridGroupingControl1.TopLevelGroupOptions.ShowCaption = false

The listview pat of the implementation works fine. However, I'm having problem having the checkbox to work.

I have a checkbox in the first column of the header and i also have the first column as a checkbox field, following the example in this forum (bounded checkbox in ggc).

However, when I clicked the checkbox, it is not checked and seems to be disable or readonly. The row is selected, but the check box is not checked. is this this because of ..

"AnyRecordFieldCell.CellType = Static" in the code above;

I do not think this should be happening since I have this line below...

this.gridGroupingControl.TableDescriptor.Columns["FirstColumn"].Appearance.AnyRecordFieldCell.CellType = "CheckBox";

can you all help?

1 Reply

AD Administrator Syncfusion Team November 13, 2006 06:42 AM UTC

Hi James,

The reason is that you are setting the ListBoxSelectionCurrentCellOptions property to GridListBoxSelectionCurrentCellOptions.HideCurrentCell. It doesn't select the current cell in a Grid. But you can do this by handling the TableControlPrepareViewStyleInfo event. Please try the attached sample and let me know if this helps.

Sample : http://www.syncfusion.com/Support/user/uploads/GGCCheckBox_c0bb1976.zip

Best Regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon