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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

extra section customisation

Thread ID:

Created:

Updated:

Platform:

Replies:

61605 May 29,2007 10:02 PM UTC May 30,2007 08:28 PM UTC WinForms 3
loading
Tags: Grouping
mitul
Asked On May 29, 2007 10:02 PM UTC

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.

haneefm [Syncfusion]
Replied On 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

mitul
Replied On 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

haneefm [Syncfusion]
Replied On 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

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

;