Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sortable grids
Message
From
17/11/1998 10:19:37
 
 
To
17/11/1998 09:39:31
Elyse Pomerantz
Dynamic Data Concepts, Inc.
Brooklyn, New York, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00158201
Message ID:
00158217
Views:
16
>I want to give my users the ability to sort their grids by any column, ascending or descending. Is there a way to get an indicator (arrow, etc.) to appear next to the caption of the sorted column and show whether it's asc or desc?

You can paint header (backcolor) differently to indicate sorting direction. You can also change header.caption

>Also, if I reverse the sort order on a grid and my current row becomes the last row, all of the other rows scroll upwards, leaving only the current (last) row visible. Is there a way to prevent it from scrolling and to show more rows?

Following code may give you some ideas:
SELECT mycursor  && grid recordfsource
SET order to mytag descending
thisform.grid1.refresh
thisform.grid1.setfocus
IF thisform.grid1.relativerow=1
 FOR n=1 to 5
  thisform.grid1.doscroll(0)
 ENDFOR
ENDIF
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform