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

Grid Formula using a program variable

Thread ID:

Created:

Updated:

Platform:

Replies:

69841 Nov 14,2007 01:57 PM UTC Nov 14,2007 02:12 PM UTC Windows Forms 1
loading
Tags: GridControl
Rob Grunkemeyer
Asked On November 14, 2007 01:57 PM UTC

I am trying to use a formula cell but want to reference a variable from my program is there a way to do this?

sample would be
int total = 100;

style.CellType = "FormulaCell";
style.CellValue = "=(A0+B0)/100";

But I really want to pass in total in the formula to replace the literal 100.


Administrator [Syncfusion]
Replied On November 14, 2007 02:12 PM UTC

Once the variable has been assigned a value, you can use:

style.CellValue = string.Format("=(A0+B0)/{0}", myVariable);

Then anytime myVariable changes, you would also have to reassign the formula.



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

;