>Hi Nadya
>
>This seems to be part of some framework. Debugging and optimizing framework code can be complex. However, the refresh of the grid can be time consuming. Especially with a filter. Either GOTO command can also be a problem with a filter. If this is some framework, how are you making changes? You'd have to copy the parent code to a subclass and change that, or risk losing your changes when the next version of the framework comes out.
>
Hi Mike,
I created my own subclass named grdSorting. In this method I copied the parent code and made few changes (see NN changes indications). I should update the Header to reflect, it's a grdSorting class, not the cGrid. If the new version of the framework comes and the SetOrder method changes, my class would still use my own code. But we're not anticipating a new version of the framework, though it's a pity.
The grid uses a cursor as its recordsource. The cursor is created in PostInitHook method of the Biz object and it also has all the indexes.
>You may want to record the active column to a grid property, so you could reset the picture to default for the last active column when you switch to a new column, instead of resetting all columns.
Yes, that was my idea originally, but I thought, it's a minor thing and I doubt, it's the bottleneck. In this particular instance I just have 7 columns. I think, it must be something else.
If it's not broken, fix it until it is.
My Blog