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

Setting CellValue for entire column of FormulaCell type

Thread ID:





119760 Jul 28,2015 10:11 PM UTC Jul 29,2015 04:37 AM UTC Windows Forms 1
Tags: GridGroupingControl
Jeff Davis
Asked On July 28, 2015 10:11 PM UTC

I am able to set a specific column as FormulaCell type in a GridGroupingControl 

            gridGroupingControl1.TableDescriptor.Columns["HEADERNAME"].Appearance.RecordFieldCell.CellType = GridCellTypeName.FormulaCell;

But this code does not do anything

            gridGroupingControl1.TableDescriptor.Columns["HEADERNAME"].Appearance.RecordFieldCell.CellValue = "=SUM(A0,B0)";

Is there any way to assign a formula to an entire column without using an event handler or iterating through each row?

When I set the DataSource to a DataTable I want to just be able to set  some of the columns as Formula columns and the formula is the same for the entire column that refers to other columns.

Neelakandan Kannan [Syncfusion]
Replied On July 29, 2015 04:37 AM UTC

Hi Jeff,

Thank you for using Syncfusion products.

If you want to calculate the values based on other fields in same record, you can use ExpressionFieldDescriptor class to define the expressions for whole column instead of using Formula cells. We have provided the Dashboard sample regarding ExpressionField. So that please make use of below UG link and sample,

UG link:

Dashboard sample:
<Install Location>\Syncfusion\EssentialStudio\[Version Number]\Windows\Grid.Grouping.Windows\Samples\Filters and Expressions\Expression Field Demo

Please let me know if you have any queries.



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