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

TableCellType = SummaryFieldCell in QueryCellStyleInfo not hit for Custom Summary Row

I have grid with a Custom Summary Row at the top.
I have the fllw code in the QueryCellStyleInfo event; however, I can never hit this code. Are the cells in the SummaryRow not SummaryFieldCell?

if(e.TableCellIdentity.TableCellType == GridTableCellType.SummaryFieldCell)
{
int i = e.TableCellIdentity.Table.TableDescriptor.ColIndexToField(e.TableCellIdentity.ColIndex);
FieldDescriptor fd = e.TableCellIdentity.Table.TableDescriptor.Fields[i];
if(fd.Name == e.TableCellIdentity.Table.TableDescriptor.VisibleColumns[2].Name)
{

1 Reply

AD Administrator Syncfusion Team September 18, 2006 04:45 AM UTC

Hi James,

By default the GridTableCellType.SummaryFieldCell Enumeration indicates field cell in a SummaryRow. If you did add the GridSummaryRow to the grid without adding the GridSummaryColumnDescriptor, the SummaryFieldCell does not exist in the GridSummaryRow. It contains SummaryEmptyCell only. Attached sample works fine here.

//QueryCellInfo event.
if(e.TableCellIdentity.TableCellType == GridTableCellType.SummaryFieldCell )
Console.WriteLine(" The {2}=> {0},{1} " ,e.TableCellIdentity.RowIndex,e.TableCellIdentity.ColIndex,e.TableCellIdentity.TableCellType);
if(e.TableCellIdentity.TableCellType == GridTableCellType.SummaryEmptyCell || e.TableCellIdentity.TableCellType == GridTableCellType.SummaryTitleCell)
Console.WriteLine("The {2}=> {0},{1} " ,e.TableCellIdentity.RowIndex,e.TableCellIdentity.ColIndex,e.TableCellIdentity.TableCellType);

Sample: http://www.syncfusion.com/Support/user/uploads/GGCSummaryAtTop_9a31f33c.zip

Let me know if this helps.
Best Regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon