>Ok. Sending you the files by email.
Yashodhan,
As I could see with a quick check :
-In activate you set dynamicforecolor (if you'd set do it in init not activate)
-Your grid class has too many refresh calls and they in turn cause dynamicforecolor to be reevaluated for each and every visible cell more than needed.
-Grid class is moving pointer back and forth for validation. Depending on your buffering it might lead to unnecessary triggers to fire (if any)
-Your grid class has a reference to thisform.lnActiveColumn and stores this.Activecolumn in grid.ARCC. That property doesn't seem to be used anywhere. FWIW do not use activecolumn and activerow unless really needed. They contribute to creating slow operating grids.
-You're calling dodefault() in many places w/o passing any parameters what underlying event/method needs. It was your chance that parameter was not used. ie: Grid.ARCC
lparameters nColIndex
dodefault()
...
lparameters nColIndex
dodefault(nColIndex) && Pass the parameter
...
PS: Your sum calculation routine too is unnecessarily doing 2 sums moving the pointer. It's not needed. Do the summing once prefarably with a select-SQL and only change the calculated sum when one of values effecting the sum changes (think what'd we slow humans do if were totalling pages of accounting data and on a page only a row needs to be modified).
Cetin