Rebind RadRotator inside RadListView

2 posts, 0 answers
  1. dbozhyk
    dbozhyk avatar
    3 posts
    Member since:
    Oct 2009

    Posted 04 Aug 2011 Link to this post

    Hi

    I have RadRotator inside EditItemTemplate of RadListView. It is used for inserting images into items.
    I also need implement possibility to filter rotator's images by text pattern. Filter requires roundtrip to server.
    So I decided to put RadRotator inside UpdatePanel and to call __doPostback on key pressing in search textbox.
    But I can't rebind Rotator on Postback to show new image collection. Even when its datasource contains new data,
    Rotator shows initial collection of images.

    I create RadListView in full programmatic way. In EditItemTemplate constructor I put actual data and then instantiate rotator, but
    Rotator always show first data.

    I have simple test app here which demonstrate problem. After pressing Edit button and typing some text in search field we can see only
    how rotator blinks and images are not affected.

    My QuoteHotelItemEditTemplate implements IBindableTemplate interface and creates UpdatePanel with Rotator ctrl in InstantiateIn method.
    There I also assign data to Rotator's DataSource.
    Debugger show that Rotator binds to new data source on PostBack but page renders old result.
    Sorry for disturbing but please help me.



    PS:
    I'm using Telerik 2011 Q1.
  2. dbozhyk
    dbozhyk avatar
    3 posts
    Member since:
    Oct 2009

    Posted 04 Aug 2011 Link to this post

    I have found solution:
    I turned off EnableViewState = false for UpdatePanel which contains Rotator and
    In method InstantiateIn of EditTemplate class I directly call rotator.DataBind();
    Now it works.

    Thanks.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top