This is a migrated thread and some comments may be shown as answers.

[Solved] Self referencing hierarchy grid - records are duplicated

0 Answers 71 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Pankaj
Top achievements
Rank 1
Pankaj asked on 17 Oct 2011, 12:19 PM
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

Tags
GridView
Asked by
Pankaj
Top achievements
Rank 1
Share this question
or