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

Window and Ajax Postback

4 Answers 70 Views
Window
This is a migrated thread and some comments may be shown as answers.
Tom
Top achievements
Rank 1
Tom asked on 05 May 2011, 03:39 PM
I am learning about your controls and I start with window.
My scenario is quite typical.
A grid inside a window for manage typical searches of users ...
All works fine by I have a serious annoying problem...
Every time a change a page in grid inside the window ... the window is reloaded although all controls are in a ajaxpanel...
I try with visibleonpageload and reloadonshow properties (I just have seen previous post on a similar problem) but without a good result..,
All controls on my page is static, not reloaded after ajax postback but the only reloaded controls is the window...

What am I doind wrong?

4 Answers, 1 is accepted

Sort by
0
Cori
Top achievements
Rank 2
answered on 06 May 2011, 01:09 PM
Hello Tom,

What does your window markup look like? Is the grid inside of the RadWindow's ContentTemplate or an external page? Is the RadWindow inside the RadAjaxPanel or just the content of the window (everything inside the ContentTemplate)? If you're putting the RadWindow inside of the RadAjaxPanel, then I would suggest just to place the grid inside the RadAjaxPanel.

I hope that helps.
0
Svetlina Anati
Telerik team
answered on 06 May 2011, 02:21 PM
Hello Tom,

 I assume that you are using a RadWindow with ContentTemplate and you have wrapped it in the ajax panel as follows:


    <telerik:RadAjaxPanel ID="ajaxpanel" runat="server">
        <telerik:RadWindow ID="RadWindow1" runat="server"
..........................................................................


If so, the ajaxification will not work correctly because in this configuration the content of the radWindow is moved in the DOM and MS AJAX has limitation with this because it uses innerHTML (our RadAjax is also based on MS AJAX).

What I suggest is to move the ajax panel inside the RadWindow - in this manner you will ajaxify the content of the RadWindow and not the whole RadWindow (which is the thing actually needed in most scenarios):

<telerik:RadWindow ID="RadWindow1" runat="server">
         <ContentTemplate>
          <telerik:RadAjaxPanel ID="ajaxpanel" runat="server">



I hope that my reply is helpful, let me know how it goes.


Best wishes,
Svetlina
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
John
Top achievements
Rank 1
answered on 27 Feb 2012, 05:32 PM
Hi,

What if I made a user control containing a RadWindow. This control is suppose to be used inside many different pages or other user controls too, some of them being ajaxified (ie: An ajaxified radgrid where each item has a user control using a RadWindow).

How to implement that ?

Thanks!

John. 
0
Marin Bratanov
Telerik team
answered on 29 Feb 2012, 03:44 PM
Hi John,

If you place an asp UpdatePanel with UpdateMode set to Conditional in the ContentTemplate of the RadWindow you shouldn't have any issue with it It is a standalone control that does not depend on other controls on the page (like a RadAjaxManager or RadAjaxManagerProxy). This article treats ajaxification of a RadWindow, so you can examine it as well: http://www.telerik.com/help/aspnet-ajax/radwindow-ajaxifying.html. If you are using JavaScript functions in your user controls multiple instances will override each other's functions, so you may need to provide unique names for them. An example how to do it is shown in this KB article: http://www.telerik.com/support/kb/aspnet-ajax/general/using-dynamic-unique-names-for-javascript-functions.aspx. This is the key - providing unique IDs. Usually the ClientID is sufficient. This also applies for setting properties, not just client-side handlers. It also holds true for standard controls, not just for the RadControls.


Kind regards,
Marin
the Telerik team
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 their blog feed now.
Tags
Window
Asked by
Tom
Top achievements
Rank 1
Answers by
Cori
Top achievements
Rank 2
Svetlina Anati
Telerik team
John
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or