|
-
Nov 15th, 2006, 07:51 AM
#1
Thread Starter
Hyperactive Member
Mshflexgrid
Trying to Do a sort of this Grid from Data Extracted from a Database.
When I run this Routine to Do A header sort the Information Is on the bottom of the Grid
VB Code:
With FlexGrid
.RowSel = .Row 'forces grid to Sort all rows
.Col = 1
.ColSel = 3
.Sort = flexSortGenericAscending
End With
Amy suggestions
-
Nov 15th, 2006, 09:59 AM
#2
Re: Mshflexgrid
It might be easier to sort the data, via your SQL statement the retrieves it from the database, before you populate your grid with it.
-
Nov 15th, 2006, 04:39 PM
#3
Thread Starter
Hyperactive Member
Re: Mshflexgrid
What I am trying to do is a Header Sort I mean use row Zero's Header columes names for the sort.
I do an alpha sort on loading
-
Nov 15th, 2006, 06:32 PM
#4
Re: Mshflexgrid
the Information Is on the bottom of the Grid
Can you explain the problem better. What information is on the bottom?
-
Nov 16th, 2006, 12:42 AM
#5
Thread Starter
Hyperactive Member
Re: Mshflexgrid
Once I click on the header The sort Routine I posted Will do its thing But all Blank Cell appear First with Data Being Last cells In the grid.
What i am tyring to do is sort by name for all inputs of the assingment sheets.
I wish to also but the grid by date
-
Nov 18th, 2006, 04:26 PM
#6
Thread Starter
Hyperactive Member
Re: Mshflexgrid
Let me better explane this problem I have
I was trying to do a colume sort by employee name so that I could get all assignment sheets for employees that was in my database.
this way I could print/edit any of the entrys.
The problem I came up with is that when using the sort for the msflegrid I found that all cell that were blank came up first and the ones with data came up on the bottom of the grid.
I use the Row location of the sheet as a way to load that sheet.
-
Nov 18th, 2006, 05:46 PM
#7
Re: Mshflexgrid
The Flexgrid treats every row as data, if you have blank cells where an Employee Name is also located, where would you expect them to be placed. If you want the blanks at the bottom and the names starting at the top , sorted in ascending order then
1) sort the entire grid in descending order.
2) find the last row that contains an employee name.
3) sort from the first row to the last row from step 2 in ascending order.
But it sounds like you have multiple rows per employee name. Maybe post a screenshot of the grid before the sort has occurred.
-
Nov 18th, 2006, 09:47 PM
#8
Thread Starter
Hyperactive Member
Re: Mshflexgrid
Ok I can ge a screen shot but how do you put it on here
-
Nov 19th, 2006, 12:53 PM
#9
Re: Mshflexgrid
You just need to attach it.. to do that, go to "Post Reply" (instead of the Quick Reply box below), and then click on the "Manage Attachments" button.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|