Hierarchical Flexgrid question

  • Thread starter Nicholas Scarpinato
  • Start date
N

Nicholas Scarpinato

I recently downloaded Peter Hibbs' Flexgrid demo, and while it worked
wonderfully, it turned out that Flexgrid was too small to handle the amount
of data I'm working with. No big deal, I simply replaced the Flexgrid with
the Hierarchical Flexgrid and that worked just fine. (I didn't even have to
change the code, I changed the Hierarchical Flexgrid's name to flxgrd and it
used the existing code without any modifications.) So, thank you Peter for
the wonderful demo.

Now, on to my question. I've figured out how to move the focus of the
flexgrid to a row based on searching the row headers. I'm using a For...Next
loop to search flxgrd.TextMatrix(i, 0) and compare it to Me!Searchbox, then
move the focus to flxgrd.Row = i, flxgrd.Col = 2 (the first non-fixed column
in the Flexgrid). My problem is that this only moves the focus to that
cell... it doesn't actually scroll the data down so that the row is visible.
(Some of the data I'm displaying in this grid is hundreds of rows long.) Is
there a way to scroll the data down (or up) to that row?
 
P

Peter Hibbs

Nicholas,

Yes there is, it is called TopRow.

For example, if your grid has 100 rows and you want row 50 to be the
one that is the first visible row you would use :-

flxgrd.TopRow = 50

Note that you have to place this command AFTER the
flxgrd.Redraw = True command (not sure why, just one of those things).

BTW thanks for the comments about my demo.

HTH

Peter Hibbs.
 
N

Nicholas Scarpinato

Thank you Peter. I figured this out on my own with a bit more digging, but I
did end up using TopRow as you mention here and it worked perfectly.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top