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

Dynamically filter

3 Answers 91 Views
Grid
This is a migrated thread and some comments may be shown as answers.
ezra barak
Top achievements
Rank 1
ezra barak asked on 28 Mar 2010, 12:59 PM
Hy
I have a radgrid and i want to filter the grid dynamically from the c#.
I also need to "sort" and "group by" the grid and i succeed to do that but i cudn't  succeed to filter it.

ReportGeneratorRadGrid.MasterTableView.Columns.FindByUniqueName("xxx").CurrentFilterFunction = GridKnownFunction.EqualTo;
ReportGeneratorRadGrid.MasterTableView.Columns.FindByUniqueName("xxx").CurrentFilterValue = "Open";
ReportGeneratorRadGrid.Rebind()


I can see the parameters that i put but the data isn't actually filtered.
How can i do it. 
Thnks alot
Ezra

3 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 01 Apr 2010, 07:32 AM
Hello ezra barak,

To see more information on how to handle the required functionality, please refer to the following topic:

http://www.telerik.com/help/aspnet-ajax/grdoperatewithfilterexpression.html

I hope this gets you started properly.

Greetings,
Yavor
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.
0
ezra barak
Top achievements
Rank 1
answered on 06 Apr 2010, 11:16 AM
Hi
Thanks a lot it was very helpful, but i have a new problem, i can't succeed to initial to filters on radgrid its always take the last i do/
Here is the "loop" that do my filter:
for (int i = 0; i < split.Length; i++)
        {
            string columnUniqeName = split[i].Substring(0, (indexOfEqual));
            string filterValue = split[i].Substring((indexOfEqual + 1));
            ReportGeneratorRadGrid.MasterTableView.FilterExpression = "(["+ columnUniqeName + "] = \'" + filterValue + "\') ";
            GridColumn column = ReportGeneratorRadGrid.MasterTableView.GetColumnSafe(columnUniqeName);
            column.CurrentFilterFunction = GridKnownFunction.EqualTo;
            column.CurrentFilterValue = filterValue;
        }
        ReportGeneratorRadGrid.MasterTableView.Rebind(); 

waiting for answer
Thanks
Ezra
0
Yavor
Telerik team
answered on 08 Apr 2010, 12:57 PM
Hello ezra,

I reviewed the code, and it looks correct. If the issue persists, you can open a formal support ticket, and send us the problematic implementation for additional review and testing. We will debug it locally, and get back to you with more information on the matter.

Sincerely yours,
Yavor
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
ezra barak
Top achievements
Rank 1
Answers by
Yavor
Telerik team
ezra barak
Top achievements
Rank 1
Share this question
or