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

Root level filter also filters children

1 Answer 19 Views
Grid
This is a migrated thread and some comments may be shown as answers.
tim
Top achievements
Rank 1
tim asked on 02 Aug 2010, 11:02 AM
This question concerns a self-refercing hierarchy as on http://www.telerik.com/help/aspnet/grid/grdselfreferencinghierarchy.html

When I apply this in page_load:
RadGrid1.MasterTableView.FilterExpression = "ParentID IS NULL"  (for an entitydatasource)
I get:

http://img704.imageshack.us/img704/8003/withi.jpg

When I remove the filterexpression,
// RadGrid1.MasterTableView.FilterExpression = "ParentID IS NULL"  (for an entitydatasource)
I get this:
http://img514.imageshack.us/img514/5739/without.jpg

How to solve this problem?

Thanks,
Tim




1 Answer, 1 is accepted

Sort by
0
Mira
Telerik team
answered on 05 Aug 2010, 08:52 AM
Hello Tim,

Please use the following code to implement the desired functionality and let me know whether it helps:
RadGrid1.MasterTableView.FilterExpression = "it.ParentID == null"; //if the ParentID is of type string
RadGrid1.MasterTableView.FilterExpression = "(it.ParentID == null)"; //if the ParentID is of type int

For additional information on operating with the FilterExpression of the RadGrid manually, you can take a look at this help topic.

Sincerely yours,
Mira
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
Grid
Asked by
tim
Top achievements
Rank 1
Answers by
Mira
Telerik team
Share this question
or