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

center confirm window in my grid

1 Answer 60 Views
Window
This is a migrated thread and some comments may be shown as answers.
Kjell
Top achievements
Rank 1
Iron
Kjell asked on 20 Sep 2013, 11:37 AM
I use telerik:RadWindowManager to confirm when I delete in mymy grid
<telerik:GridButtonColumn UniqueName="DeleteButton" ButtonType="ImageButton" ConfirmText="Radera denna aktivitet?" ConfirmDialogType="RadWindow" CommandName="Delete" HeaderStyle-Width="30px" />

How can I center the RadWindow in my grid.
Have tried the RestrictionZoneID, left, top but nothing happens?
It centers on the display window, I want to center it in my grid, which is not located in the middle of the page.

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 24 Sep 2013, 12:39 PM
Hello Kjell,

WIth this setup the confirm dialog will always be centered in the browser, as this is its purpose. Since this functionality is encapsulated you can hardly get a reference to the popup in order to move it, so I would suggest going with a more customized approach - you would need your own button (i.e., in a template column) so you can call the RadConfirm with your own script in order to have a reference to it (the radconfirm() method returns that reference). Once you have it you can use the RadWindow's client-side API and call the moveTo() method to center it above the grid (or, generally, move it around in the screen).
The following resources would be helpful in this task:
- http://demos.telerik.com/aspnet-ajax/window/examples/confirmserverclicks/defaultcs.aspx - to see how to confirm clicks on a button
- http://www.telerik.com/help/aspnet-ajax/window-programming-radwindow-methods.html - RadWindow's API
- http://www.telerik.com/help/aspnet-ajax/telerik-static-client-library.html - our static client library that you can find useful when calculating positions and dimensions. Of course, any other means can be used to get the desired position, e.g. jQuery


Regards,
Marin Bratanov
Telerik
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 the blog feed now.
Tags
Window
Asked by
Kjell
Top achievements
Rank 1
Iron
Answers by
Marin Bratanov
Telerik team
Share this question
or