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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Finding columns associated with CaptionSummaryRows

Thread ID:





20811 Oct 26,2004 11:08 AM UTC Oct 27,2004 06:34 AM UTC WinForms 2
Tags: Grouping
Anthony Avella
Asked On October 26, 2004 11:08 AM UTC

I''m trying to hide the value in the cells of various detail records when that column is a column which is part of a CaptionSummaryRow. I''ve been using the following test in my QueryCellStyleInfo event handler: if ((e.TableCellIdentity.TableCellType == GridTableCellType.RecordFieldCell || e.TableCellIdentity.TableCellType == GridTableCellType.AlternateRecordFieldCell) && e.TableCellIdentity.SummaryColumn != null) I thought that the e.TableCellIdentity.SummaryColumn property told me whether a column was associated with any CaptionSummaryRow in a grid. Can you please tell me how to properly find this out in the event handler?

Administrator [Syncfusion]
Replied On October 27, 2004 06:21 AM UTC

e.TableCellIdentity.SummaryColumn is only set if th eelement is a captionrow or summaryrow. So, if you want this information on recordrows, then you would have to track it yourself. You could add a private ArrayList member, and add the column names used in your summaries to the ArrayList as you add the columns to teh summaryrow. Then in QueryCellStyleInfo, you could use code like this where colsInSummary is the arraylist:
//blanks out the summary column
if ((e.TableCellIdentity.TableCellType == GridTableCellType.RecordFieldCell 
|| e.TableCellIdentity.TableCellType == GridTableCellType.AlternateRecordFieldCell)
&& this.colsInSummary.IndexOf(e.TableCellIdentity.SummaryColumn.Column.Name) > -1)
	e.Style.CellValue = "";

Administrator [Syncfusion]
Replied On October 27, 2004 06:34 AM UTC

If you want to catch the cell in the summary itself (as opposed to the record cells contributing to the summary), then you can use code like if ((e.TableCellIdentity.TableCellType == GridTableCellType.GroupCaptionSummaryCell && e.TableCellIdentity.SummaryColumn != null) since e.TableCellIdentity.SummaryColumn should be set for these cell types.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon