Hi,
I am using conditional formatting on some columns in my grid. One of the columns is a date/time column on which I have created a Formula condition such as this:
"datediff( "d" , [//FormulaCondition/ConditionValue] , today() ) > 30"
This condition checks if the date of the column is at least 30 days in the past.
I find when I apply such a condition, the grid performs very slowly in scrolling etc. Also when I save the grid layout with this condition, it changes the UI render time from about 0.4 to 4 seconds.
I have experimented with other date/time functions (such as check if the cell value is equal to a particular date) and get similar poor performance.
Anyone experience this before? is this a bug?
Thanks!
David.
Try setting the Visual Studio IDE to break on all run-time exceptions and then run it and see if any exceptions are occurring. If there are exceptions, then that would explain the slowdown. Exceptions tend to slow things down quite a bit, even when they are handled internally. If that's the case, then I would say that this probably is a bug. The CalcManager should be checking for nulls or DBNulls explicitly rather than raising and catching exceptions.
I was playing around with a sample program and I think I have found the cause of my slowdown. Many of my rows have a null value in the date/time column. Once I inserted a "isdbnull()" condition before the datediff condition and turned off "apply all matching conditions" option, the slowdown was completely fixed.
I guess the date/time formulas have trouble dealing with null values.
is this still a bug? At least there is a workaround for now.