Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
850
Add formula in runtime
posted

Hello guys,

First of all, "happy christmas and Happy new year"

Ok, this is my "problem", I have a Grid with four columns (See picture)

in Time2 and Time3 I'm using a formula as:

 

UltraGrid1.DisplayLayout.Bands(0).Columns(2).Formula =

"dateadd ( 'n' , 20 , [Time1] )"

UltraGrid1.DisplayLayout.Bands(0).Columns(3).Formula =

"dateadd ( 'n' , 120 , [Time2] )"

this is because in my proyect 20 and 120 are data that change in value

in that case, i need to use variables.

so far everything is fine, My grid is filled very good

BUT, if I try to move up or down using the grid's scrollbar,

it shows me empty cells, and seconds later It shows data (See picture)

Is it Normal that this happen?

Is there a solution to fix this?....

 

 

Parents
  • 469350
    Offline posted

    Hi,

    The grid and the UltraCalcManager are optimized, by default, so that they perform calculations asynchronously and so that the visible rows in the grid are calculated first.

    If you have a very large number of rows, it's possible to scroll a row into view before it has been calculated. But since that row is now visible, it gets priority and gets calculated immediately.

    You can control this using the DeferredCalculationsEnabled and CalcFrequency properties on the UltraCalcManager component. But this will probably not be desirable, since it will cause performance problems in your application.

    Another option would be to set ShowCalculatingText on each of these grid columns to True. This would make the grid column display some text like "(Calculating)" to indicate to the user that calculations are being performed. There would still be a delay, but at least it would be more clear to the user what's happening.

     

Reply Children
No Data