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

GridGroupingControl: how to change the cellType and cellValueType of each cell individually

i have a GridGroupingControl, how to change the cellType and cellValueType of each cell individually?
i use TableModel but the following statements do not effective:

Grid1.TableModel[3,4].CellType = "CheckBox";
Grid1.TableModel[3,4].CellValueType = typeof(bool);

Thanks!

1 Reply

CI Christopher Issac Sunder K Syncfusion Team July 8, 2010 08:43 AM UTC

Hi Ben,

Thanks for your interest in Syncfusion Products.

In GridGroupingControl, individual cell styles cannot be set through TableModel. There are certain events available to achieve this purpose: QueryCellStyleInfo & PrepareViewStyleInfo events.


this.gridGroupingControl1.QueryCellStyleInfo += new GridTableCellStyleInfoEventHandler(gridGroupingControl1_QueryCellStyleInfo);

void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
if (e.TableCellIdentity.RowIndex == 7 && e.TableCellIdentity.ColIndex == 3)
{
e.Style.CellType = "CheckBox";
e.Style.CellValueType = typeof(bool);
}
}


Please let me know if you have any other concerns.

Regards,
Christo

Loader.
Live Chat Icon For mobile
Up arrow icon