Hi ,
I Have some requirement with Wintree.
Please check the example below.
My Stored Procedure giving me the Two recordsets;
First Set :
ID Name Dept
------------------------
1 Red CSE
2 Blue ECE
3 Gray EEE
Second :
ID Contact Place
-------------------------
1 123 Xyz
1 234 DDD
1 456 FFF
2 233 LLL
3 456 JKL
so My requirement is In the first set and Second Set ID is the common thing ...
i am using Wintree control..
so i need to display like
1 Red CSE (Node1) and Drill down each..
123 Xyz
234 DDD
456 FFF
2 Blue ECE (Node 2)
233 LLL
3 Gray EEE (Node 3)
456 JKL
So How to set up these kind of requirement using WinGrid.
so Please update the sample code to set up this.
Thanks,
Red
Hi Brain,
Thanks a lot
1) If by "drilldown" you mean the the expansion indicators are appearing, you can set the UltraTree.NodeLevelOverrides[1].ShowExpansionIndicator property to 'CheckOnDisplay'; if there are no child nodes, the expansion indicators will not be displayed. You can suppress them altogether by setting that property to 'Never'.
2) To hide columns, you can handle the ColumnSetGenerated event, iterate the e.ColumnSet.Columns collection, and set the Visible property to false on the ones you don't want to show.
along with above requirement i want to Hide the ID Both Node and Childs ...
like
(+/-) Red CSE
123 XYZ
ID coloum is hidden in both,........
See My sample Code...
DataSet ds = new DataSet();
DataTable dt = (DataTable)spr.RecordSets[0].Copy();
DataTable dt2 = (DataTable)spr.RecordSets[1].Copy();
ds.Tables.Add(dt);
ds.Tables.Add(dt2);
ds.Relations.Add(dt.Columns[
"ID"], dt2.Columns["ID"]);
ultraTree1.DataSource = ds.Tables[0];
it's coming fine but... (+)Drilldown is coming for each Child row also...
but ineed
(+/-) 1 Red CSE
when i drill down is only for root nodes ...no need for each child..
How will we handle this?
Assuming these two "recordsets" are DataTables, you need to add them to the same DataSet (if you have not done so already), and add a DataRelation to the DataSet's Relations collection the 'ID' column of each table is the column that you would specify to define the relation.