Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sorting recordsets

Status
Not open for further replies.

steveouthwaite

Programmer
Feb 12, 2003
165
GB
Hi
I have a data environment called "Denv1"
in there, I have a command called "Storenames" that is linked to a table in the Database

this command has a child command called "names", pointing to annother table.

I have a MSHFlexgrid bound to the "Storenames" command

Everything is fine so far - I can open and close the bands on the grid to see the records in the "names" table

The problem is that the records are not in any order.

I can sort the "Storenames" recordset using:

denv1.rsStoreNames.sort = "storename asc"

so now the grid shows the stores in alphabetical order.

I can't seem to get a similar sort on the child data, i.e. currently the grid looks something like:


StoreName Name
---------- ----
aaTestSite fred
aaTestSite john
aaTestSite Alvin
baTestSite Peter
baTestSite Betty
baTestSite Jane

I would like it to look like:

StoreName Name
---------- ----
aaTestSite Alvin
aaTestSite fred
aaTestSite john
baTestSite Betty
baTestSite Jane
baTestSite Peter

Any sugestions?


Cheers
SteveO
 
In a msfFlexgrid you can:

with msfFlexgrid
.Col = 9
.ColSel = 9
.Sort = 5 'ascending
end with

After it is loaded. I don't know if MSHFlexgrid bound has the same capability
 
Thanks, but as you guessed, it wont work when Hflexgrid is bound

Error 30021
"command not available when bound to Hierachical data"


SteveO
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top