>>>>I saw a trick where you can sort a column by clicking on the header. I'd like to use this, but it's too time consuming to add the code to every header. So I thought I'd make a header class. But VFP doesn't like it when I try to do that. Is there a way to subclass the header class?
>>>>
>>>>Another issue is putting indexes on every field in every table so it can sort. Is this a good idea? I'm wondering if that would slow things down significantly.
>>>>
>>>>Thanks,
>>>>
>>>>-Michelle
>>>
>>>There is also third approach to it, like it is done in VFX framework . There is a grid subcass and a Grid Builder where you just select if the columns should be sorted, and the Grid Builder writes the OnSort() method call into each Header.DblClick(). The indexes a built on the fly and destroyed when necessary by ClearAllidx() method.
>>>
>>>Just somebody's 2 cents... :)
>>>
>>>Nick
>>
>>Someone else suggested making a builder, too. It sounds interesting, but I'm not ready to jump into making a builder at this point.
>>
>>Thanks,
>>
>>-Michelle
>
>No big deal. You can drop the builder :) and just add OnSort() and Clearidx() methods to your grid class and write manually
> this.parent.parent.OnSort(this.parent.ControlSource)
>in each column Header.
>
>Nick
That doesn't sound too hard. :)
Thanks,
-Michelle
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement