RadWindow reopens when other item clicked

3 posts, 1 answers
  1. Mark
    Mark avatar
    23 posts
    Member since:
    Sep 2014

    Posted 24 Oct 2014 Link to this post

    Hello Telerik, 

    I recently noticed a problem in my Wep App and I think it should be easy to solve. I probably just forgot one thing, but I can't seem to find it.

    Basically, as seen in the pictures, there's a RadGrid that contains various items and once you click on the reference number in the list (a LinkButton),
    it pops up a RadWindow with details about that order (second picture).

    My problem is the following, once I close the RadWindow, it closes properly and everything is fine and it takes me back to the RadGrid.
    If I click on another item, it pops up the first RadWindow I opened, and then on top of that opens the new one.

    I can close the window, select another link and then the first, second and now third will be there.
    The last one clicked being on top of all and the first one being the last under every other ones. 

    I don't really know where to search and I can provide code if you want but there is alot of code so.. it would be long.

    Thank you!
  2. Answer
    Marin Bratanov
    Marin Bratanov avatar
    3555 posts

    Posted 27 Oct 2014 Link to this post

    Hi Mark,

    Such behavior is observed when you set the VisibleOnPageLoad property of the RadWindow on the server and do not reset it, so after the next postback you add yet another instance and both show up. The following article explains how to open a RadWIndow from the server and how a script registration is a better approach in most cases: http://www.telerik.com/help/aspnet-ajax/window-troubleshooting-opening-from-server.html.

    Also, when creating RadWindows dynamically, it is better to do this on the client and not on the server: http://www.telerik.com/help/aspnet-ajax/window-programming-opening.html in order to benefit from the client-side windows creation the control offers, by reducing postbacks and server controls creation.

    Last, but not least, I advise that you examine this demo that shows how to achieve a nearly identical scenario by attaching some client-side handlers: http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=window.


    Marin Bratanov

    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.

  3. DevCraft R3 2016 release webinar banner
  4. Mark
    Mark avatar
    23 posts
    Member since:
    Sep 2014

    Posted 28 Oct 2014 in reply to Marin Bratanov Link to this post

    Thank you Marin, I solved the problem by only adding: EnableViewState = False. 

    But I will also take a look at the other suggestions since it can do as much as possible on the client side,
Back to Top