• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 300
  • Last Modified:

FlexGrid and TreeView, Force scrolling to show selected item

In both a tree view control and a flexgrid control I want to cross reference nodes and rows, I can programmatically locate the corresponding cross reference between the two views of my data BUT I cannot ‘force’ the 'other' control to scroll up/down so that the cross referenced entry is visible to the user. Any ideas.
0
nvms
Asked:
nvms
1 Solution
 
JzaltheralCommented:
Well, I don't know anything about the FlexGrid control as I have never had to use one, but I can help you out with the TreeView.

To select an item in the TreeView control and force the control to go where that item is, use the following code:

Set TreeView1.SelectedItem = TreeView1.Nodes.Item(Index)
TreeView1.SetFocus

Good luck.

Jzal
0
 
nvmsAuthor Commented:
To easy : )   I didn't realise that SelectedItem was a writeable property, very cool.

I also solved the MSFlexGrid problem with this:
If .RowIsVisible(X) = False Then
  ' Force view !
  .TopRow = .Row
End If

Also very simple,

Thanks again

Stewart
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now