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

Duplicates in SelfHierarchy RadGrid

1 Answer 43 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Torsten
Top achievements
Rank 1
Torsten asked on 22 Nov 2011, 01:50 PM
I have a problem with RadGrid in "SelfHierarchyMode".

My settings in aspx:
<telerik:RadGrid runat="server" ID="rgArtikelSuche" AllowSorting="false" AllowFilteringByColumn="false"
AutoGenerateColumns="false" AllowMultiRowSelection="true" Visible="false" OnNeedDataSource="rgArtikelSuche_NeedDataSource" >
<ClientSettings AllowKeyboardNavigation="true" AllowExpandCollapse="true">
<Selecting AllowRowSelect="true" UseClientSelectColumnOnly="true" />
</ClientSettings>
<MasterTableView HierarchyLoadMode="Client" HierarchyDefaultExpanded="true"
DataKeyNames="Key, GroupKey">
<SelfHierarchySettings ParentKeyName="Parent" KeyName="GroupKey" />
</MasterTableView>
</telerik:RadGrid>

My datasource look like:

Key    GroupKey    Parent    Description
1        A1                null         A1
2        B1                A1          B1
3        B2                A1          B2
4        A2                null         A2
5        B3                A2          B3

The Elements B1, B2 and B3 are shown on ClientSide under their parent Element AND direct under the root, so they were shown twice.

WHY????

1 Answer, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 25 Nov 2011, 08:03 AM
Hi Torsten,

I would suggest you to review the following online demo which shows the correct approach for building self referencing hierarchy. I hope this helps.

Kind regards,
Maria Ilieva
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Grid
Asked by
Torsten
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or