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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Problem with formulas

Thread ID:

Created:

Updated:

Platform:

Replies:

18553 Sep 2,2004 12:34 PM UTC Sep 2,2004 12:49 PM UTC WinForms 1
loading
Tags: GridControl
Jorge
Asked On September 2, 2004 12:34 PM UTC

I''m having a small problem using formulas with GridControl. In my project I have a GridControl which is not bounded to any datasource. In that grid I have 22 columns which 5 of them are readonly and are formula oriented. but when I do insert a formula in that column : Me.gridModel.ColStyles(17).Text = "= A2 + 10" all rows in that column stay with the same value. I would like the row 3 to have the formula "= A3 + 10"; row 4 with "= A4 + 10" How can I do this?

Administrator [Syncfusion]
Replied On September 2, 2004 12:49 PM UTC

Currently, you have to loop through the cells in the column, and format the string appropriately.
for(int row = 1; <= grid.RowCount; ++row)
     grid[row, 17].Text = string.Format("= A{0} + 3", row);
In the next release (do not know when - if you want a private build, you can submit a Direct Trac incident and request one), there will be a convention if you would use row 0 in a formula, it will be treated as a wild card that can be used to enter the formula into the grid.ColStyles as you tried above. In that case, the grid will swap out the zero for current row as it parses the expression.

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

;