Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
105
Hiearchical data (a couple of levels deep) displayed as a flat view
posted

Hello.

I have hierarchical data stored in an object hierarchy that I am trying to display with the XamDataGrid.  Let's say that my object hierarchy is like this:

public class Company

{

   public string Name;

   public List<Department> Departments;

}

 public class Department

{

    public string Name;

   public List<Employee> Employees;

}

public class Employee

{

    public string Name;

   public List<Address> Addresses;

}

public class Address

{

    public string Name;

}

 

I know how to bind to grid using multiple layouts to see my data displayed in a hierarchical view, but I would like to display the data in "flat" view such that each data row contains the following data: Company.Name, Company.Department.Name, Company.Department.Employee.Name, Company.Department.Employee.Address.Name

What is confusing to me is how to handle the various collections (Departments, Employees, Addresses) without introducing multiple layouts which seem to cause the grid to display the data in a hierarchical view.  I read this post (http://community.infragistics.com/forums/p/23298/85318.aspx) and this post (http://community.infragistics.com/forums/p/33257/181453.aspx) and they're close to what I'm looking for, but don't address the multiple collections issue.

Is it possible to do what I'm attempting to do and if so, can someone point me in the right direction? Any help is appreciated...thanks.

Jerome

  • 138253
    Offline posted

    Hello Jerome,

     

    It has been a while since you have made your post, in case you still need support I will be glad to assist you further. I suppose the other community members can benefit from this answer as well. I have been looking through your post and I suggest you see this forum thread:

     

    http://blogs.infragistics.com/forums/p/9346/296068.aspx

     

    where a similar issue like yours is discussed.

     

    Feel free to write me if you have further questions.