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

Radgridview

1 Answer 41 Views
GridView
This is a migrated thread and some comments may be shown as answers.
piyush
Top achievements
Rank 1
piyush asked on 22 Jul 2010, 05:35 AM
Hi
I want to create a RadGridview hierarchy using parent child relation of my datamodel. I am trying to use ISSelfrefrence(true) property of ChildtableDefinition. Using this property I am able to show parent child relation in my radgridview. Now In my parent radgridview I only want to eliminate duplicate rows i.e. the rows that are shown in child grid should not be shown in parent grid. For example :
my datasource has 100 rows and I am setting Isselfreference = true, so out of this 100 rows 10 rows will form my parentgrid and 90 rows will form 10 grids (each containing 9 rows) for each row of my parent grid. So only 10 rows will be visible in my parent grid and remaining 90 will only appear in my childgrids. Is there a way to acheive this in Radgridview ????????????

1 Answer, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 22 Jul 2010, 09:39 AM
Hello piyush,

You can use the properties that define the parent-child relationship to filter the item that appear in child grids.

For example, if ParendID represents the field that links a child to its parent you can apply a filter that will filter out all items that have ParentID different from -1, provided that -1 dictates that an item does not have a parent.

<telerik:RadGridView.FilterDescriptors
    <telerik:FilterDescriptor Member="ParentID" Operator="IsEqualTo" Value="-1"/> 
</telerik:RadGridView.FilterDescriptors>


Regards,
Milan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
piyush
Top achievements
Rank 1
Answers by
Milan
Telerik team
Share this question
or