Multiple nested datagrids , hierarchy of datagrids, datagrid within a datagrid

Posted by Krishnasamy2008 under Silverlight on 2/2/2012 | Points: 10 | Views : 2013 | Status : [Member] | Replies : 1
I need to populate the multiple nested datagrids

like i have a first datagrid when a row in the first datagrid is clicked or selected below this row a second datagrid with related information from the row selected in the first datagrid will be displayed, similarly when a row in the second datagrid is selected a third datagrid will be displayed below the selected row. i need a hierarchy of datagrids, can it be achieved using RowDetailsTemplate or is there any alternate methods. I dont want to use "GroupDescriptions" of the pagecollectionview since i dont want to bring all the data in one shot.

Multiple Nested Datagrids

DataGrid1 --> Row Selected or clicked

Display Second DataGrid --> Row Selected or Clicked

Display Third DataGrid

Kindly suggest a solution

Thanks & Regards


Posted by: Superb1986 on: 7/1/2012 [Member] Starter | Points: 25

yes you can achieve this with the row detail template easily but you have to frame the class like that eg. the main grid should consist the data list for the child and the child should have the data list for sub child. see the below class structure.

public class classA
public string NameA {get;set;}
public List<classB> ChildColl {get;set;}

public class classB
public string NameB {get;set;}
public List<classC> ChildColl {get;set;}

public class classC
public string NameC {get;set;}


Krishnasamy2008, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response