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.
Syncfusion Feedback

GridGroupingControl more complex expressions in summary...

Thread ID:

Created:

Updated:

Platform:

Replies:

119446 Jun 22,2015 01:09 PM UTC Jun 25,2015 12:13 PM UTC Windows Forms 4
loading
Tags: GridGroupingControl
maurizio ziraldo
Asked On June 22, 2015 01:09 PM UTC

Hi,

I cannot understand how complex can be the expressions used in summaries. In the documentation we read:

http://help.syncfusion.com/ug/windows%20forms/Documents/listofexpressions.htm

but if I want to calculate the absolute value of a number in my expression and to use it in a summary field, how can I do it?
And if I want to use the if/then/else statement?
Does the expression system of GridGroupingControl support formula as in GridControl?

Thanks.

Anish George [Syncfusion]
Replied On June 23, 2015 01:31 PM UTC

Hi Maurizio,

Thank you for your interest in Syncfusion products.

Could you please give us more details on your query and on which scenario you are using this so that it would be helpful for us to give you a quick solution. Regarding the Forumula support, GridGroupingControl supports Formula cell type like in GridControl. If you are looking on how to create custom summary then we suggest you to look into the below link for more details.

http://help.syncfusion.com/ug/windows%20forms/index.html#!Documents/customsummary.htm

Please let us know if you need any further assistance.

Regards,
Anish.

maurizio ziraldo
Replied On June 24, 2015 07:45 AM UTC

Hi,

I attached a modified version of your IBindingList demo with what I need to do with summaries (see comments).
I had already read the documentation on custom summaries, but I don't understand if I need them in may case.
Thanks.

Attachment: bindinglistdemo_4da8a222.zip

Anish George [Syncfusion]
Replied On June 25, 2015 12:13 PM UTC

Hi Maurizio,

 We suggest you to use the QueryCellInfoStyle event for achieving your query. By using this event you can get access of the summary cell and you can change the cell type of that particular cell. Please refer the below KB link for making the Summary cell type to Formula CellType. Also refer the below code for your reference.

VB:

Me.gridGroupingControl1.QueryCellStyleInfo += gridGroupingControl1_QueryCellStyleInfo
Public Sub gridGroupingControl1_QueryCellStyleInfo(sender As Object, e As GridTableCellStyleInfoEventArgs)
Select Case e.TableCellIdentity.TableCellType
Case GridTableCellType.GroupCaptionSummaryCell
If True Then
If e.TableCellIdentity.SummaryColumn IsNot Nothing AndAlso e.TableCellIdentity.SummaryColumn.Name = "Sum3" Then
Dim row As GridSummaryRow = TryCast(e.TableCellIdentity.DisplayElement, GridSummaryRow)
e.Style.CellType = GridCellTypeName.FormulaCell
e.Style.CellValue = "=5+5"//Required Formula
End If
Exit Select
End If
End Select
End Sub


KB link:

http://www.syncfusion.com/kb/4571/how-to-customize-the-summary-column-for-specific-rows         

 Please let us know if you need any further assistance.

 Regards,
 Anish.

Anish George [Syncfusion]
Replied On June 25, 2015 12:13 PM UTC

Hi Maurizio,

 We suggest you to use the QueryCellInfoStyle event for achieving your query. By using this event you can get access of the summary cell and you can change the cell type of that particular cell. Please refer the below KB link for making the Summary cell type to Formula CellType. Also refer the below code for your reference.

VB:

Me.gridGroupingControl1.QueryCellStyleInfo += gridGroupingControl1_QueryCellStyleInfo
Public Sub gridGroupingControl1_QueryCellStyleInfo(sender As Object, e As GridTableCellStyleInfoEventArgs)
Select Case e.TableCellIdentity.TableCellType
Case GridTableCellType.GroupCaptionSummaryCell
If True Then
If e.TableCellIdentity.SummaryColumn IsNot Nothing AndAlso e.TableCellIdentity.SummaryColumn.Name = "Sum3" Then
Dim row As GridSummaryRow = TryCast(e.TableCellIdentity.DisplayElement, GridSummaryRow)
e.Style.CellType = GridCellTypeName.FormulaCell
e.Style.CellValue = "=5+5"//Required Formula
End If
Exit Select
End If
End Select
End Sub


KB link:

http://www.syncfusion.com/kb/4571/how-to-customize-the-summary-column-for-specific-rows         

 Please let us know if you need any further assistance.

 Regards,
 Anish.

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

;