Self referencing hierarchy grid - records are duplicated

1 posts, 0 answers
  1. Pankaj
    Pankaj avatar
    1 posts
    Member since:
    Oct 2011

    Posted 17 Oct 2011 Link to this post

    Hi,

    I am using self reference hierarchy in RadGridView and facing the issue where the records are getting duplicated. The grid is used to show manager hierarchy.
    e.g.
    when the grid get bound i could see the structure like-
    -Super Manager
        -Manager1
            -Reportee1.1    
            -Reportee2.1
        -Manager2
            -Reportee2.1
        -Reportee1.1    
        -Reportee1.2    
        -Reportee2.1    

    here the Reportee1.1, Reportee1.2, Reportee2.1  are repeated.
     
    Would like to see just  following data
    -Super Manager
        -Manager1
            -Reportee1.1    
            -Reportee2.1
        -Manager2
            -Reportee2.1

    I used following xaml code for self referencing in Grid-

     

     

     

    <telerik:RadGridView.ChildTableDefinitions>
    <telerik:GridViewTableDefinition>
    <telerik:GridViewTableDefinition.Relation>
    <telerik:TableRelation IsSelfReference="True">
    <telerik:TableRelation.FieldNames>  

     

    <telerik:FieldDescriptorNamePair ParentFieldDescriptorName="EmployeeID" ChildFieldDescriptorName="ManagerID" />  

     

    </telerik:TableRelation.FieldNames>  

     

    </telerik:TableRelation>  

     

    </telerik:GridViewTableDefinition.Relation

     

    </telerik:GridViewTableDefinition>  

     

    </telerik:RadGridView.ChildTableDefinitions>

     


    Can someone help me find this solution? Waiting for earliest response.
    Thanks,
    Pankaj

Back to Top