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
65
Diplaying Record item that has expandable field and child rows
posted

I am having trouble showing child rows when a datarecord has an expandable field.  The grid will only show expandable fields and it does not show the childrows, however i can see the childrows and the expandable field getting assigned the correct fieldlayout in the OnAssigningFieldLayoutToItem method.  I am binding a collection of Securable objects to the xamadatagrid, my class snippets are listed below.

RootObject Name Description
Object1 First Level object
Permissions Name Type
User1 Read
User2 Write
Child Name Description
Child1 Child1 of Object1
Child Permission Name Type
User1 Read
User2 Write

public class secureable

public string Name {get;set;}

public string Description {get;set;}

//Expandable property

public List<Permission> Permissions {get;set;}

//Child rows

public List<Securable> Children{get; set;}

}

public class Permission

{

public string PermissionObject {set; get;}

public string PermissionRight {set; get;}

}

Parents
  • 34430
    Offline posted

    Hello Satu,

    I have built a sample project using the data structure that you have provided and am auto-generating the Fields in the XamDataGrid at the moment, and I am able to see the child rows placed in the "Children" List<Securable> that you have provided. I am auto-generating the Fields at the moment, as I am not entirely sure I understand the behavior or structure that you are seeing or are hoping to see. At the moment, the behavior I am getting on my end is that each parent "Securable" record has two expandable field records for "Children" and "Permissions." After expanding each of these, I can see the associated Permission elements and the child Securable elements.

    I am attaching the sample project I used to test this. Please run this on your machine. If this sample project is not an accurate depiction of what you are trying to do, please feel free to modify it and send it back such that it is. Alternatively, if you have an isolated sample project of your own that demonstrates the unexpected behavior that is happening on your end, I will gladly take a look if you attach it.

    My tests were made against version 17.2.20172.1000 in Infragistics for WPF 2017 Volume 2.

    Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew
    Associate Developer

    XDGExpandableFieldRecordTest.zip
Reply Children