center confirm window in my grid

2 posts, 0 answers
  1. Kjell
    Kjell avatar
    224 posts
    Member since:
    May 2011

    Posted 20 Sep 2013 Link to this post

    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.
  2. Marin Bratanov
    Marin Bratanov avatar
    5464 posts

    Posted 24 Sep 2013 Link to this post

    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:
    - - to see how to confirm clicks on a button
    - - RadWindow's API
    - - 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

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