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

Iterate round sherdian data grid

Status
Not open for further replies.

j252ewv

Programmer
Jul 2, 2008
43
GB

Help,

Can someone tell me how to iterate row the rows in a sheridain grid control?

Otherwise, if I can find them, I shall have to hire the A team.
 
iterate row the rows
Can't figure out what this means.
In a FlexGrid, you navigate using the grid's .Row & .Col properties. Putting this inside a For..Next or Do While loop is basic and easy. If the Sheridan grid works in a similar fashion, open up object browser and see if you can find properties and methods to do the same.

Cogito eggo sum – I think, therefore I am a waffle.
 
Been a while (thankfully) since I've had use a Sheridan grid but if I remember correctly you can iterate through them like a flexgrid (row, col) but by far the easiest and most reliable way was to use bookmarks, something like:
Code:
Dim bm As Variant

    For f = 0 To grdTimetable.Rows - 1
        bm = grdTimetable.AddItemBookmark(f)
        Debug.Print grdTimetable.Columns(1).CellText(bm)
    Next
This isn't production code as I've not got agrid to test it with in front of me but should be pretty close.

Hope this helps

HarleyQuinn
---------------------------------
Carter, hand me my thinking grenades!

Get the most out of Tek-Tips, read FAQ222-2244: How to get the best answers before post

 
Thanks Harleyquinn I managed to work this out about 5 minutes after I posted the query, but you are spot on!.
 
Glad you got it sorted [smile]

HarleyQuinn
---------------------------------
Carter, hand me my thinking grenades!

Get the most out of Tek-Tips, read FAQ222-2244: How to get the best answers before post

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top