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

GridGroupingControl and ExpressionFields

I'm looking for some help in adding an ExpressionField to a GridGroupingControl. I've bound a the control to datasource and added at run time an ExpressionFieldDescriptor to the TableDescriptor.ExpressionFields collection. However, the expression column doesn't render so i know I've missed something along the way. I've attached some code for review. Any help would be greatly appreciated.

Regards,

Dave

GridGroupingControlCode.zip

1 Reply

GB Gokul B Syncfusion Team March 22, 2007 10:21 PM UTC

Hi David,

Thanks for your sample code.

We can able to reproduce the issue as you mentioned. The problem is ExpressionFieldColumn fails to render whenever we use SummaryRow. So you have to create one bound column.Here Bound column name should be same as ExpressionFieldDescriptor name. please have a look at the below code snippet.

''Creates bounds column and it will add to the end of Column Collection
Me.GridGroupingControl1.TableDescriptor.Columns.Add("Total")

Private myExpression As ExpressionFieldDescriptor = New ExpressionFieldDescriptor()
Private myExpression.Name = "Total"
''Creates an Expression Column
Private myExpression.Expression = "[Freight]* [Freight]"
Me.GridGroupingControl1.TableDescriptor.ExpressionFields.Add(myExpression)

Try this and let us know if the problem still exists.

Thanks for using Syncfusion products.

Regards,
Gokulkumar.B


Loader.
Live Chat Icon For mobile
Up arrow icon