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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sort and read flexgrid

Status
Not open for further replies.

jozino01

Technical User
Apr 25, 2003
257
CA
hi,
i have one flexgrid populated with data (just text not numerical):

Set txtStream = fsoStream.OpenTextFile(DataLoc)

Do While Not txtStream.AtEndOfStream

strTextFromFile = txtStream.ReadLine
MyData = Split(strTextFromFile, ";")
FeedData = MyData(0) & vbTab & MyData(1) & vbTab & MyData(2) & vbTab & MyData(3) & vbTab & MyData(4) & vbTab & MyData(5)
MSFlexGrid1.AddItem FeedData

Loop

Set txtStream = Nothing
Set fsoStream = Nothing

what i need is:
1) to sort rows alphabetically by the first column
2) on MSFlexGrid1_Click() insert data from selected line into text boxes (six cell/six text boxes)

i think it's pretty simple if you have the right manual (which i don't have :)
 
ok, i solved how to read data:

MSFlexGrid1.Col = 0
Text1.Text = Form1.MSFlexGrid1.Text

MSFlexGrid1.Col = 1
DataPath = Form1.MSFlexGrid1.Text
MyPath = Form1.MSFlexGrid1.Text

MSFlexGrid1.Col = 2
DataSelector = Form1.MSFlexGrid1.Text
MyExt = Form1.MSFlexGrid1.Text

MSFlexGrid1.Col = 3
AdagioUserID = Form1.MSFlexGrid1.Text
MyUser = Form1.MSFlexGrid1.Text

MSFlexGrid1.Col = 4
AdagioPassword = Form1.MSFlexGrid1.Text
MyPsw = Form1.MSFlexGrid1.Text

MSFlexGrid1.Col = 5
MyCommand = Form1.MSFlexGrid1.Text

but still need a solution for sorting, please.
 
use the data form wizard and it will show you how to do all this stuff
 
ok, just in case anybody interested here is the code for sorting:

MSFlexGrid1.Col = 0
MSFlexGrid1.Sort = flexSortGenericAscending
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top