Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form.Grid.Header.Click()
Message
 
 
To
13/07/1999 21:31:31
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00239710
Message ID:
00241114
Views:
14
Juan,
* grdFind.Reorder method
lparameter pcOrder, plAscending

local i, j, llLockScreen, lnRecno, lnRelativeRow, lnDirection, lcDescending

llLockScreen = thisform.LockScreen  && prevent user from seeing all of the jumping
thisform.LockScreen = .t.

lnRecno = recno()
lnRelativeRow = this.RelativeRow
lcDescending = iif( ! plAscending, "descending", "ascending" )
set order to pcOrder &lcDescending
this.Refresh()

goto lnRecno                        && move record pointer back
this.Refresh()

if ( lnRelativeRow != this.RelativeRow )
   * the record didn't wind up at the same grid row, so we scroll the grid

   lnDirection = iif( lnRelativeRow > this.RelativeRow, 0, 1 )
   j = abs( lnRelativeRow - this.RelativeRow )
   for i = 1 to j
      this.DoScroll( lnDirection )
   endfor

   this.Refresh() && YAR
endif

thisform.LockScreen = llLockScreen
>>if ( ! empty( this.mcTag ) and ! this.mlColumnMoved and ! this.mlColumnSized )
>> * sortable column that was clicked
>> this.mlAscending = ! this.mlAscending
>> this.parent.parent.Reorder( this.mcTag, this.mlAscending )
>> loArrow.mcColumnName = this.parent.Name
>>endif
>
>Hi David, this thread was very interesting.
>I want to know something, What code did you put in this.parent.parent.Reorder( this.mcTag, this.mlAscending )?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform