Hello Tim,
Maybe you could try something like this
Check if a folder item is selected in a datagrid item in the
selectedindexchanged event. If so expand the folder Node in the treeview
with findnode and expand
Treeview1.FindNode("Authors\\Shakespeare").Expand( ); or Select
I hope this contributes to a solution.
regards,
Koen Hakvoort
"Tymbow" <> wrote in message
news:08BDF2CE-9998-4802-973B-...
> I'm building a web application that is analogous to the Windows XP file
> explorer in function. The left column contains a TreeView, and the right
> column a DataGrid populated by selecting TreeView nodes. The TreeView
> populates dynamically as there are a significant number of nodes. The
> DataGrid displays both the items and the nodes from the TreeView. Using
> the
> explorer analogy this means the TreeView shows folders, and the DataGrid
> folders and files.
>
> The issue I have is that I would like to be able to update the TreeView to
> show the selected node if the user selects the matching node from the
> DataGrid. Again with the Explorer analogy, if the user selected a folder,
> the
> folder tree would update to match the change. I'm not sure it's possible
> due
> to the dynamic nature of the TreeView in this example as the node may not
> even exist in the nodes collection (eg: The TreeView shows the root node
> plus
> 1 level but the user has drilled down 3 levels in the DataGrid from the
> root
> node).
>
> Any suggestions?
>
> Kind Regards,
> Tim.
|