Window and Ajax Postback

5 posts, 0 answers
  1. Tom
    Tom avatar
    1 posts
    Member since:
    May 2011

    Posted 05 May 2011 Link to this post

    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?

  2. Cori
    Cori avatar
    562 posts
    Member since:
    Jul 2010

    Posted 06 May 2011 Link to this post

    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.
  3. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 06 May 2011 Link to this post

    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.

  4. John
    John avatar
    2 posts
    Member since:
    Jan 2011

    Posted 27 Feb 2012 Link to this post

    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. 
  5. Marin Bratanov
    Admin
    Marin Bratanov avatar
    4529 posts

    Posted 29 Feb 2012 Link to this post

    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.
Back to Top