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

[Solved] Popup windows from a grid

2 Answers 152 Views
Grid
This is a migrated thread and some comments may be shown as answers.
robert
Top achievements
Rank 1
robert asked on 22 Apr 2008, 12:20 AM
Would like your advice on how to implement the following functionality.

We would like to have an image in a column which, when the user clicks it, opens a RadWindow with additional information on the item in that row.  We would like the user to be able to click on several rows and open multiple windows at a time. 

Once these windows are open, we would like them to survive postbacks (for example, when the user sorts or groups the grid). 

First, it seems like we need to create the windows dynamically, since we don't know how many row icons the user may click in advance.  And we must do it server-side, since the windows must be created there, I believe, to survive postbacks. 

If we create windows dynamically in a gridbuttoncolumn itemcommand event, how do we know how to create them again in a postback, so they can apply viewstate back to themselves (the Url's, etc)?  And when someone clicks Close for a window client side, and our close handler removes it from window manager client-side, do we need to do something server-side to follow this up?

Is it possible to do this?  I don't quite see how it fits all together.  Do you have an example?

Regards,
Bob Reader

2 Answers, 1 is accepted

Sort by
0
robert
Top achievements
Rank 1
answered on 22 Apr 2008, 02:22 PM
I have an additional question:  I have noticed that the RadWindow does not persist any changes made on the client through a postback, eg. changes made in javascript (the setting of a Url), or changes made by the user (moving or resizing the window).  Is there any way to enable this behavior?  I would have thought you would have captured these properties to a hidden field just before postback and applied them on the server just after viewstate restoration, to allow a RadWindow to appear unchanged through a postback. 
0
Lini
Telerik team
answered on 25 Apr 2008, 07:28 AM
Hi,

I don't think that this is a supported scenario for the RadWindow - as you said the settings are not persisted when you postback.

Your scenario could work if you update the grid with ajax. This way the whole page will not postback and the windows will remain after the grid is updated. The windows are opened on the client using the radopen() function - http://www.telerik.com/help/radcontrols/aspnet-ajax/window_ProgrammingOpening.html
You just need to place a RadWindowManager control somewhere on the page and set up the appropriate radopen() function calls when you click the images in the grid.

Greetings,
Lini
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
robert
Top achievements
Rank 1
Answers by
robert
Top achievements
Rank 1
Lini
Telerik team
Share this question
or