On May 19, 2008, at 8:55 AM, Paul McNett wrote:

>> I would like go to the top of the recordset when a column header is
>> clicked in a Grid. So as you click different headers, the grid  
>> displays
>> the lowest(or highest) key for the selected column as the first row  
>> of
>> the grid..
>>
>> I have tried picking up the 'GridHeaderMouseLeftClick' event,  
>> changing
>> the CurrentRow property and refreshing the grid, but this doesn't  
>> do it.
>>
>> I hope you can offer me some advice.
>
> Is your grid hooked up to a bizobj for the DataSource? If so, then  
> what
> you want to do is do a biz.first() and then refresh the grid.
>
> But first make sure your event handler is being called, by putting a
> print statement in there...


        Or you could try overriding grid.processSort() as follows:

def processSort(self, gridCol=None, toggleSort=True):
        super(<your grid class>, self).processSort(gridCol=gridCol,  
toggleSort=toggleSort)
        self.CurrentRow = 0

        If that doesn't work, you could add a print statement there to  
confirm that the method is being called, and we can debug from there.  
But see if this works first.

-- Ed Leafe





_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]

Reply via email to