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

RadWindow reopens when other item clicked

2 Answers 67 Views
Window
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 24 Oct 2014, 06:31 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 27 Oct 2014, 02:26 PM

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.


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.

 
0
Mark
Top achievements
Rank 1
answered on 28 Oct 2014, 02:21 PM
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,
Tags
Window
Asked by
Mark
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Mark
Top achievements
Rank 1
Share this question
or