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

Problem with FormattedText?

I have tab control with two tab pages. The first page has a Syncfusion grid, the second page has a chart. I first load the grid with data and formulas. Then I retrieve the values for certain cells to populate the chart. I am using Dim s = Me.GridControl1(row, col).FormattedText to obtain the cell''s contents (allowing for either a formula cell or a text cell). According to some pattern that I haven''t determined yet, some, but not all, of the formula cells return a value of "Input string was not in a correct format". I have no idea why -- when the load process is done, and the grid is displayed, all of the cells show the appropriate value. Is there some sort of "Force-calc-now" flag or method that I need to execute to properly utilize the FormattedText property? Thanks, s.s.

2 Replies

AD Administrator Syncfusion Team September 6, 2004 04:29 PM UTC

Just in case, this is using version

AD Administrator Syncfusion Team September 6, 2004 05:33 PM UTC

The has RecalculateRange methods to explicitly force cells to recalculate. I am not sure whether the from June of 2003 has this method or not. Normally, looping through and explicitly retrieveing grid(row.col).FormattedText should trigger a recalculation if it is needed. You could try setting grid(row,col).FormulaTag = Nothing before trying to retrieve grid(row,col).FormattedText as this would force the grid to both reparse and recompute the formulas. Have you set any of the style.CellValueType property on any of your formula cells? If so, this might be causing the problem as formula cells have to be of type string. I would recommend updating to to see if that takes care of this problem.

Live Chat Icon For mobile
Up arrow icon