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

Rebind RadRotator inside RadListView

1 Answer 50 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
dbozhyk
Top achievements
Rank 1
dbozhyk asked on 04 Aug 2011, 06:45 PM
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.

1 Answer, 1 is accepted

Sort by
0
dbozhyk
Top achievements
Rank 1
answered on 05 Aug 2011, 12:02 AM
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.
Tags
Rotator
Asked by
dbozhyk
Top achievements
Rank 1
Answers by
dbozhyk
Top achievements
Rank 1
Share this question
or