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

Entirely Dynamic RadFilter

1 Answer 80 Views
Filter
This is a migrated thread and some comments may be shown as answers.
JD
Top achievements
Rank 1
JD asked on 15 Sep 2013, 02:12 AM
Hi,

I have been searching the forums (and internet at large) for examples of creating RadFilter dynamically (zero markup).  I have been able to do it piecing together samples and dissecting non-dynamic samples, but I always run into weird issues.  Right now I'm stuck at not being able to read expression values at the ProcessGroup step; the filters are intact, but values are always empty string.

I suspect there are samples out there that do what I'm trying to do so I'm just asking someone to point me to them.

1. create RadFilter dynamically at run time.
2. use dynamically-populated DropDown lists, and MultiSelect lists in my expressions (probably loaded at the ExpressionItemCreated event, think of populating a Zipcode list based on what the user selected in State)
3. after Apply, bind the filter to a RadGrid and load the grid.  The grid can't beloaded beforehand because it would return a zillion records without the filter applied, bogging down the server and creating long wait times for the user.

Thanks in advance,
JD  

1 Answer, 1 is accepted

Sort by
0
Antonio Stoilkov
Telerik team
answered on 18 Sep 2013, 10:03 AM
Hi Justyn,

RadFilter programmatic creation is straightforward and could be done in the Page_Init event where the FieldEditors should also be created as shown below.

However, populating custom controls inside expression items could not be achieved in ExpressionItemCreated event. You will need to create a custom field editors which properly extract and copy their values. You could go trough the help article below which describes how custom field editors could be implemented.

If your issue still persist you could open a formal ticket and attached a sample project showing the unwanted behavior so we could debug it and advice you with the best possible solution.

Regards,
Antonio Stoilkov
Telerik
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 the blog feed now.
Tags
Filter
Asked by
JD
Top achievements
Rank 1
Answers by
Antonio Stoilkov
Telerik team
Share this question
or