Sorting date's in MSFlex grid 
Author Message
 Sorting date's in MSFlex grid

To sort by date (grdhistory is the name of my flexgrid): dim tmpdate as
date dim tmpnumber as long dim y as integer dim maxy as integer

            Y = 1 maxy = grdhistory.Rows While maxy > Y grdhistory.Row =
            Y grdhistory.Col = 5 tmpdate = grdhistory.Text 'converts
            date to numeric so it can be sorted tmpnumber = tmpdate
            grdhistory.Text = tmpnumber Y = Y + 1 Wend grdhistory.Sort =
            flexSortNumericAscending 'sorts Y = 1 While maxy > Y
            grdhistory.Row = Y tmpnumber = grdhistory.Text tmpdate =
            tmpnumber grdhistory.Text = tmpdate 'puts it back as date
            format Y = Y + 1 Wend

--
Posted via dBforums
http://www.*-*-*.com/



Tue, 03 Aug 2004 14:19:29 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Sorting date's in MSFlex grid

2. MSFlex Grid .row select doesn't update display

3. Q:Sorting A Grid Bound To A Ado DataControl Using A Parameter'd Stored Procedure

4. Problem using a MSFlex Grid in an Outllook Form

5. MSFlex Grid

6. MSFlex Grid

7. Removing items from MSFlex Grid

8. Load MSFlex grid in columns vs. rows

9. MSFLEX GRID

10. MSFlex Grid Row Headings

11. MSFlex grid - how to position cursor at runtime

12. MSFlex Grid use

 

 
Powered by phpBB® Forum Software