AJAX en dynamics generated controls

2 posts, 0 answers
  1. Anders
    Anders avatar
    30 posts
    Member since:
    Jul 2013

    Posted 18 Apr 2014 Link to this post

    Hi all,

    First of I'm not sure this is the right place for my question, but I could't find a more appropriate.  

    On a web page I have have sidebar and main content area. In the main content is a RadGrid with a collections of products of a selected product category. In the sidebar I have User control where the user can filter the product in the grid. This QuickFilter user control have a RadPanelBar and in every panel is a CheckBoxList. This UI of the was requirement from the client.

     The RadPanelBar Items and the CheckBVoxLists are created dynamic because that the number of filter categories (panels in the RadPanelBar) and the number of filter options (check boxes in the CheckBoxList) are different from one product category to another.
    In the Page_Inet of the user control I create the RadPanelItems and the CheckBoxLists, so that they an there values are been persisted in the ViewState. In OnClick event of a button I read out the selected check boxes and query the database for the RaGrid and do a Rebind op the grid.
    This works as expected.

    But now build in a "Brand" selector. I's simple two RadioButtons sitting in the sidebar. In the SelectedIndexChange I have to build the Filter User Control again because that the filter categories and filter options are different between the two Brands.

    But because the SelectedIndexChange fires after the Page_Init the new build RadPanelBar items en check boxes are not added to the ViewState. and therefor the selected values aren't persisted.

    I have tried to build the RadPanelBar items en check boxes again on the SelectedIndexChange but this seems to work.

    I would like just to refresch the Filter User Control in the SelectedIndexChange so that the Page_Init was fired again. Is this possible/ Or can I add the dynamic created controls and the value to the ViewState?

    Or is there another solution?

    Anders Pedersen
  2. Ianko
    Ianko avatar
    1955 posts

    Posted 22 Apr 2014 Link to this post

    Hello Anders,

    The implemented scenario seem that is built with a quite complex usage of the Telerik controls.

    I suggest providing a simple example, that demonstrates the encountered issue, so that it could be locally run and investigated. If you need further assistance on how to isolate the scenario I would suggest following this Telerik blog post.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top