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
how to control columns display when displaying hierarchical data using XamDataGrid
posted
 

How do I control the columns display when displaying hierarchical data.

suppose I have 2 tables

  Table1 {'ParentID', 'Name', 'Type'} and Table2 { 'FKReferenceID', AccountName, AccountNumber}

    while displaying in grid, I dont want to display ParentID in Table1 and 'FKReferenceID' in Table2.

can somebody help me, how to do this please.

Thanks

  • 65
    posted in reply to Joseph Dour [Infragistics]

    I got it fixed it the other fourm my question

    hierarchical set of datas ?

    thanks for information, hope it will help in my future problems.

    Thanks

    Manand

  • 4850
    Offline posted

    There are a couple of ways of accomplishing this.

    • Set the xamDataGrid.FieldLayoutSettings.AutoGenerateFields property to false and add each Field that you want to include explicitly to the FieldLayout's Fields collection (set each field's Name to the name of the column in the underlying table to identify it).
    • Leave the xamDataGrid.FieldLayoutSettings.AutoGenerateFields alone and just add the Field that you want to hide to the FieldLayout's Fields collection setting its Visibility property to 'Collapsed'.
    • Handle the FieldLayoutInitialized event and set the 'ParentID' Field's Visibility to 'Collapsed' for the 1st FieldLayout and 'FKRefernceID' in the 2nd FieldLayout. Instead of setting the Visibility to Collapsed you could also remove these Fields from the Fields collection here.

    I hope this helps.