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

extra section customisation

Hi,

Thanks for your help so far.
I would like to know if there is a way to customise the columns of an extra section so that they match the columns in the rest of the grid. For example, I have a column that has a datasource assigned to it when the column is added (i.e. once). At the moment, to assign the datasource to the extra section, I am doing it in QueryCellStyleInfo. But I want to avoid doing this over and over again repeatedly. Is there a way I can get the extra section columns to match the column properties of the table without using QueryCellStyleInfo?

Thanks.

3 Replies

HA haneefm Syncfusion Team May 29, 2007 11:58 PM UTC

Hi Mitual,

By default, GroupingGrid doesn't store any style info properties. You can not set any cell or row specific properties for the GroupingGrid other than the CellValue. But you can set the Column specific properties except extra section column by using the GridColumnDescriptor. You need to handle the TableControlPrepareViewStyleInfo (or QueryCellStyleInfo) event to do this. Through this event you can set the style properties for the grid.

private void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
if((e.TableCellIdentity.DisplayElement is GridExtraSection )
{
e.Style.BackColor = Color.red;
}
}

Best regards,
Haneef


MI mitul May 30, 2007 09:49 AM UTC

In which case, can you tell me which of QueryCellStyleInfo and TableControlPrepareViewStyleInfo are called LESS often?

>Hi Mitual,

By default, GroupingGrid doesn't store any style info properties. You can not set any cell or row specific properties for the GroupingGrid other than the CellValue. But you can set the Column specific properties except extra section column by using the GridColumnDescriptor. You need to handle the TableControlPrepareViewStyleInfo (or QueryCellStyleInfo) event to do this. Through this event you can set the style properties for the grid.

private void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
if((e.TableCellIdentity.DisplayElement is GridExtraSection )
{
e.Style.BackColor = Color.red;
}
}

Best regards,
Haneef


HA haneefm Syncfusion Team May 30, 2007 08:28 PM UTC

Hi Mitul,

QueryCellStyleInfo is hit whenever the grid needs a cell style for any reason. But TableControlPrepareViewStyleInfo is hit whenever the grid prepares a cell style for drawing. So you can try handling the QueryCellStyleInfo event to resolve the problem and let me know if this helps.

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon