MSFlexGrid Sort Question 
Author Message
 MSFlexGrid Sort Question

I am using the standart MSFlexGrid control. I have it set up with several
empty rows for users to add data.  When I try to do an ascending sort on the
rows with data the rows are sorted but are put at the bottom of all the
blank rows.  Anyone know a way around this?  I've tried using Row and RowSel
but that hasn't worked.

John



Fri, 28 Apr 2000 03:00:00 GMT  
 MSFlexGrid Sort Question

Blank rows, will always be on top. You could delete them first, sort the
grid & then insert them again.

Alesh Mustar
VBBBN Vice-President

http://www.vbbbn.com

Quote:

>I am using the standart MSFlexGrid control. I have it set up with several
>empty rows for users to add data.  When I try to do an ascending sort on
the
>rows with data the rows are sorted but are put at the bottom of all the
>blank rows.  Anyone know a way around this?  I've tried using Row and
RowSel
>but that hasn't worked.

>John




Sat, 29 Apr 2000 03:00:00 GMT  
 MSFlexGrid Sort Question



Quote:
>I am using the standart MSFlexGrid control. I have it set up with several
>empty rows for users to add data.  When I try to do an ascending sort on the
>rows with data the rows are sorted but are put at the bottom of all the
>blank rows.

It helps if you had said where you did want them.

Quote:
>  Anyone know a way around this?  I've tried using Row and RowSel
>but that hasn't worked.

Rows containg data can be sorted in "groups" using Row and RowSel, with
blank rows being left where they are (of course you have to know which
rows are blank).
It's important to specify Row,Col first and then RowSel,ColSel
e.g. to sort rows 1 to 5 on Column 1
With MsFlexGrid1
 .Row = 1
 .Col = 1
 .RowSel = 5
 .ColSel = 1
 .Sort = flexSortGenericAscending
End With

This is *not* the same as:

With MsFlexGrid1
 .Row = 1
 .RowSel = 5
 .Col = 1
 .ColSel = 1
 .Sort = flexSortGenericAscending
End With

If all the rows, including blank rows, are sorted then the blank rows
will end up at the top of the grid. The blank rows can then be moved
using RowPosition. Another way is to use the Clip property and modify
the Clip string.

--
Richard Mason
Stevenage, UK



Sat, 29 Apr 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. MSFlexGrid Control - Sorting Question

2. msflexgrid sorting and unlinking

3. Sorting by Date within MSFlexGrid

4. Sorting by Date within MSFlexGrid

5. Sorting by Date within MSFlexGrid

6. Sorting by Date within MSFlexGrid

7. MSFlexGrid printing and sorting?

8. MSFlexGrid sort

9. Sorting the MSflexgrid

10. Sorting MSFlexgrid (VB5.0pro)

11. MSFlexGrid : how to un-sort rows ???

12. MSFlexGrid column sort

 

 
Powered by phpBB® Forum Software