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.

QueryCellStyleInfo is not called for grouped tables

Thread ID:

Created:

Updated:

Platform:

Replies:

83577 Jun 25,2009 08:41 PM Jun 26,2009 09:48 AM ASP.NET Web Forms (Classic) 2
loading
Tags: GridGroupingControl
Vasili Sviridov
Asked On June 25, 2009 08:41 PM

I have a grouping grid, and I'd like to apply custom formatting to the cells. It works for the table when no grouping is done. As soon as any grouping is applied - all the columns in the resulting sub-tables are not styled. The event handler is not even called for them.

Do I have to assign a delegate to those groups during binding or is there some option to cascade that delegate to all sub-tables in the grid?

Thank you.

Vasili Sviridov
Replied On June 25, 2009 08:55 PM



my delegate assignment did not happen after postback - hence no rendering


Rekha P [Syncfusion]
Replied On June 26, 2009 09:48 AM

Hi Vasili,

Thank you for your interest in Essential Grid.

Please find a simple sample illustrating the event triggering of QueryCellStyleInfo with the grouped tables and the reported issue may cause due enabling the QueryCellStyleInfo event within !IsPostBack condition.

Code Snippet:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.GridGroupingControl1.DataSource = GetData();
}
this.GridGroupingControl1.QueryCellStyleInfo += new GridTableCellStyleInfoEventHandler(GridGroupingControl1_QueryCellStyleInfo);
}

void GridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
if (e.TableCellIdentity.TableCellType == GridTableCellType.RecordFieldCell ||
e.TableCellIdentity.TableCellType == GridTableCellType.AlternateRecordFieldCell ||
e.TableCellIdentity.TableCellType == GridTableCellType.ColumnHeaderCell)
{
e.Style.Borders.All = new Syncfusion.Windows.Forms.Grid.GridBorder(Syncfusion.Windows.Forms.Grid.GridBorderStyle.DashDotDot, Color.Blue);
e.Style.TextColor = Color.Brown;
e.Handled = true;
}
}


http://files.syncfusion.com/support/GGC.Web/7.2.0.37/F83577/main.htm

In the above sample, the cell text color and its border style will be sustained through grouped columns. Please let me know if this solves your issue or could you please try reproducing it in the above sample and send us the modified sample so that we could sort out the cause of the issue and provide you a solution?

Thanks,
Rekha

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.

;