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.

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

Thread ID:

Created:

Updated:

Platform:

Replies:

95415 Jul 7,2010 02:41 AM Jul 8,2010 04:43 AM Windows Forms 1
loading
Tags: Grouping
Administrator [Syncfusion]
Asked On July 7, 2010 02:41 AM

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!

Christopher Issac Sunder K [Syncfusion]
Replied On July 8, 2010 04:43 AM

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

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.

;