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.

Setting CellValue for entire column of FormulaCell type

Thread ID:

Created:

Updated:

Platform:

Replies:

119760 Jul 28,2015 06:11 PM Jul 29,2015 12:37 AM Windows Forms 1
loading
Tags: GridGroupingControl
Jeff Davis
Asked On July 28, 2015 06:11 PM

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 12:37 AM

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:
http://help.syncfusion.com/ug/windows%20forms/Documents/expressionfields.htm
http://help.syncfusion.com/ug/windows%20forms/Documents/howtoaddexpressioncolumns.htm
http://help.syncfusion.com/ug/windows%20forms/Documents/howtoaddexpressionfields.htm

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.

Regards,
Neelakandan

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.

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.

;