I agree with your friends. Though I might not bother maintaining an index on fields that aren't likely sort candidates.
Some people have subclassed their grid headers (which works if you are using code-based classes), so that they will have this capability in their click. You could relatively easily get the header's parent's controlsource (if your columns are bound) and build an index on the fly.
This would be useful for view-based grids where you don't have persistent indices.
>Hello,
> I use the Visual Foxpro 3 to 6.
> How to code the grid box, so that when I click one of the column header, the records will be sorted base on that column?
> My friends suggest me to build index for each column on the cursor. Is it the only way? If the grid box have 12 column, will I build 12 index?
> Can I code this function on grid level rather than cursor level?
>Thanks. :D
>-Jasper
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only