Click on one column; sort on another |
Post Reply |
Author | |
Mike Lewis
Groupie Joined: 29 April 2009 Status: Offline Points: 41 |
Post Options
Thanks(0)
Posted: 20 November 2009 at 5:14am |
I've done this before, so I know it's possible, but now I can't get it to work.
I want to let the user click on the header of Column 2, but have the grid sorted on Column 5 (which is invisible). I've tried putting the following in the SortOrderChanged: IF THIS.SortOrder(0).Index = 2 THIS.SortOrder.DeleteAll THIS.SortOrder.Add(THIS.Columns(5)) THIS.Populate ENDIF (The above code is Visual FoxPro, but the meaning should be fairly obvious to those of you who prefer VB.) When I run this, nothing happens when I click on the Column 2 header. The other columns work as expected. Thanks in advance for any help. (I'm using ver 13.1 of the ActiveX version of the Report Control.) Mike |
|
Mike Lewis
Software Developer Edinburgh, Scotland |
|
Mike Lewis
Groupie Joined: 29 April 2009 Status: Offline Points: 41 |
Post Options
Thanks(0)
|
I still don't have the solution to this, but it's no longer that important as I've found a workaround.
My aim was to let the user sort on a column of dates. Some of the dates are blank. I wanted the blank dates to sort high, that is, to appear after all other dates (when sorted to ascending order). My workaround is to set the blank dates to a high value, and to hide them within the grid (by setting the format string to a single space). So now I don't have to bother with the hidden column: the user can just click the date column and it behaves as expected. I'd still be interested in knowing how to let the user click on one column but sort on another, but it's no longer urgent. Mike |
|
Mike Lewis
Software Developer Edinburgh, Scotland |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |