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

programatically creating FilterDescriptorCollection

5 Answers 41 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Todd Millett
Top achievements
Rank 1
Todd Millett asked on 18 Feb 2011, 09:54 AM
Is is possible to create a FilterDescriptorCollection programatically without the filter control available on the grid, so that  on certain operations the collection is created and bind to the grid so the grid is filtered automatically. Can you share a sample of the same?

5 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 18 Feb 2011, 10:02 AM
Hello Todd Millett,

This is totally possible. However you don't need to actually create the collection, since RadGridView.FilterDescriptors has not setter (it is a collection after all).

Simply start adding your FilterDescriptors to the RadGridView.FilterDescriptors collection.

I believe that my blog post will shed a lot of light on this subject.

Let me know if you have any questions after covering the blog.

Kind regards,
Ross
the Telerik team
0
Todd Millett
Top achievements
Rank 1
answered on 18 Feb 2011, 11:31 AM
Is there any way i can apply multiple values for a column as a filter criteria. Example : take a column name "UserType", it can contain values like "Dev", "Test", "Tech", "QA".... I want to generate a filter criteria programatically, so that on load only the "Dev", "Tech" and "QA" would be displayed, but any time, user can select the option "Test" from the filter control and repopulate the grid.
0
Rossen Hristov
Telerik team
answered on 18 Feb 2011, 11:37 AM
Hi Todd Millett,

Yes, you can. This is clearly explained in the blog that I mentioned.

Please read it carefully.

Greetings,
Ross
the Telerik team
0
mahesh
Top achievements
Rank 1
answered on 15 Mar 2011, 04:28 PM
I want to save the FilterDescriptorCollection as XML.Is it possible to seraialize this object,if so where can I get the code.

Thanks
Mahesh.N

 

0
Rossen Hristov
Telerik team
answered on 16 Mar 2011, 09:56 AM
Hello,

Maybe this Code Library can help.

Best wishes,
Ross
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
GridView
Asked by
Todd Millett
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Todd Millett
Top achievements
Rank 1
mahesh
Top achievements
Rank 1
Share this question
or