Entirely Dynamic RadFilter

2 posts, 0 answers
  1. JD
    JD avatar
    22 posts
    Member since:
    Jul 2013

    Posted 14 Sep 2013 Link to this post

    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  
  2. Antonio Stoilkov
    Admin
    Antonio Stoilkov avatar
    530 posts

    Posted 18 Sep 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top