Hierarchical and recursive nested datagrid

N

nicolas

Hi!
I want to populate a hierarchical datagrid with a parent-child datatable.

Category | ParentCategory | Name
xxx | xxx | xxx

What i want to do is to populate one datagrid with the first level category
column and each time we click on the +/- button of a category row,
it should insert a datagrid with the child category in this row. etc... (A
type of treeview but with datagrid)

-Category 1ID | Category1 Name
-|__ Category 1.1| Category 1.1 Name
+|__ Category 1.2 | Category 1.2 Name

+Category 2ID | Category2 Name


Thanks a lot for your help and sorry for my poor english.
 
K

Ken Cox [Microsoft MVP]

Hi Nicolas,

Make sure you check out this excellent article and code. It goes at least one
level, so you may be able to nest it double.

Nested Grids for Hierarchical Data

http://msdn.microsoft.com/msdnmag/issues/03/10/CuttingEdge/


--

Help stop SWEN in the newsgroups - Get the W32.Swen.A@mm Removal Tool:
http://securityresponse.symantec.com/avcenter/venc/data/[email protected]




Hi!
I want to populate a hierarchical datagrid with a parent-child datatable.

Category | ParentCategory | Name
xxx | xxx | xxx

What i want to do is to populate one datagrid with the first level category
column and each time we click on the +/- button of a category row,
it should insert a datagrid with the child category in this row. etc... (A
type of treeview but with datagrid)

-Category 1ID | Category1 Name
-|__ Category 1.1| Category 1.1 Name
+|__ Category 1.2 | Category 1.2 Name

+Category 2ID | Category2 Name


Thanks a lot for your help and sorry for my poor english.
 
N

Nicolas Chevet

OK, this article is great.
But I need to use only one table with parent-child relations columns.
How can i use my table with the nestedDatagrid and how can i have more than
2 level?

Thanks a lot.
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top