When using the tree view I would like to set a node image depending on what I have specified in the datatabe. for intance I am doing the following:
1. I load a datset datatable from an SQL database
the columns in the Datatable are
ID, ParentID, Name, SQL_Query, Type
list is listed as follows with the binding:
"TreeView_Reports", "Select * from SYSM_T_REPORT_TREE_VIEW ORDER BY NAME")
Me.TV_Reports.DataSource = ds.Tables("TreeView_Reports")
Me.TV_Reports.ValueMember = "ID"
Me.TV_Reports.ParentIDMember = "ParentID"
Me.TV_Reports.DisplayMember = "Name"
Me.TV_Reports.DataMember = "SQL_Query"
I would like to be able to set the image depending on the "Type". for instance I have 2 options here type = Folder or Type = Report. I want the node that corelates to "Folder" to display a folder image that i have in my images list (ImageID 0) and if Type = Report, then the node image should show that of a report Image (ImageID 1).
I also plan to have if I double click the folder, it will expand the node as it currently is, however if I double click the Report node it will spawn off a DataGridView in another form that I have loading into the RadDock MDI Container.
any help you could offer would be greatly appreciated.