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

AJAX won't update controls in RadWindow

2 Answers 180 Views
Window
This is a migrated thread and some comments may be shown as answers.
Shannon
Top achievements
Rank 1
Shannon asked on 03 Apr 2014, 12:02 AM
I don't know why all the sudden it stopped working but it was working before. I have a RadListView inside a RadWindow should be updated by a click from an outside button on the page. it's been working just fine until recently, listview won't update anymore, during debugging I did see the datasource is updated with new data, the problem is that ajax doesn't refresh the control.

And I have a RadFilter in another window, every time I click on the filter it caused a full post back, but I registered the control with rad ajax manager so it shouldn't post back. And this was working too before.

All other controls outside of the rad windows are working as expected with ajax.

Then I upgraded from 2012 version to 2014  but it didn't fix the issue. I tried on both IE9, 10 and firefox, all the same. Why in the earth that it stopped working all the sudden?

2 Answers, 1 is accepted

Sort by
0
Shannon
Top achievements
Rank 1
answered on 03 Apr 2014, 12:43 AM
I figured out a solution for one issue which is the radListView binding problem. Weird thing is that I have to also register radWindow as an ajaxUpdatedControl now. After I did this, the list view get updated properly, but I didn't do this before.

<telerik:AjaxSetting AjaxControlID="buttonBind">
<UpdatedControls>
 <telerik:AjaxUpdatedControl ControlID="radWindow1" />
<telerik:AjaxUpdatedControl ControlID="RadListViewMain_radWindow1" />
</UpdatedControls>
</telerik:AjaxSetting>

I tried to do this to the RadFilter in another radWindow, but it doesn't work. I have no clue what happened and why the first work-around works...

so can someone explain a little?

Thanks a lot!
0
Marin Bratanov
Telerik team
answered on 04 Apr 2014, 12:35 PM

Hi Shannon,

Have you had a chance to examine this help article: http://www.telerik.com/help/aspnet-ajax/window-ajaxifying.html? It explains how AJAX in a RadWindow should be used.

Generally, having the RadWindow as an updated control should not be needed in case AJAX has been configured properly on the page. You should make sure there are no nested AJAX settings and/or update panels and that the listview has the ID attribute set exactly to RadListViewMain_radWindow1, because AJAX settings do not need client IDs, but the serve ID of the control.

All that being said, I think you will have the best control over this setup by using an asp:UpdatePanel with UpdateMode=Conditional in the ContentTemplate of the RadWindow. Here are the benefits from this:

  • the control(s) inside (the listtview and probably a few others) will invoke partial postbacks
  • you can always call its Update() server method from another partial postback to ensure it will travel to the client and update the listview for the user

I hope this helps in this scenario.

 

In case you are using the NavigateUrl - AJAX from the main page cannot affect controls in the content page loaded in the RadWIndow and you have a few options:

I hope this explains this case too.


Regards,

Marin Bratanov
Telerik
 

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.

 
Tags
Window
Asked by
Shannon
Top achievements
Rank 1
Answers by
Shannon
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or