Customize RadGrid PopUp edit form position with an extender

Thread is closed for posting
1 posts, 1 answers
  1. Answer
    63F75A2C-1F16-4AED-AFE8-B1BBD57646AD avatar
    1572 posts
    Member since:
    Oct 2004

    Posted 19 Jul 2010 Link to this post


    RadControls for ASP .NET AJAX version 2010.2.713 and later
    .NET version 3.5 and later
    Visual Studio version 2008 or later
    Programming language C#
    Browser support

    all browsers supported by RadControls for ASP .NET AJAX

    When using the PopUp edit form in RadGrid, the default location the popup appears in may not always meet the needs of the project. You may need to position the popup edit form on the center of the grid, the viewport or immediately below or above the edited item. This code library project gives you an ASP.NET AJAX extender control that can be used to customize the popup location in RadGrid.

    The GridPopupPositionExtender provides easy configuration for the display position of the RadGrid Popup edit form. To setup the GridPopupPositionExtender:

    1. Enable the Popup edit mode in RadGrid (RadGrid.MasterTableView.EditMode = GridEditMode.PopUp)
    2. Add a GridPopupPositionExtender to your page and set the TargetControlID of the extender to the ID of the RadGrid.

    Once the extender is attached to RadGrid, you can configure the following extender properties:

    • RelativeTo - specifies the object relative to which the popup will be positioned.
    • HorizontalPosition - specifies the horizontal alignment of the popup relative to the specified object.
    • VerticalPosition - specifies the vertical alignment of the popup relative to the specified object.
    • HorizontalOffset* - specifies the offset (in pixels) from the specified horizontal position and relative object.
    • VerticalOffset* - specifies the offset (in pixels) from the specified vertical position and relative object.
    • EnablePopupMove - specifies whether the popup can be dragged.

    * The HorizontalOffset and VerticalOffset properties are not applied when the HorizontalPosition and VerticalPosition properties are set to Center and Middle, respectively.

    When the GridPopupPositionExtender is attached to RadGrid, the position of the edit form that is opened each time you edit an item will be set by the extender based on the setting you have defined.
Back to Top

This Code Library is part of the product documentation and subject to the respective product license agreement.