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

[Solved] how to change the popup location in rad editable grid

1 Answer 79 Views
Grid
This is a migrated thread and some comments may be shown as answers.
balasubramanian kanagaraj
Top achievements
Rank 1
balasubramanian kanagaraj asked on 21 Jul 2009, 12:01 PM
Hi,
     I had create  one rad editable grid . i want to allign the popup in right. Is it possible in rad edit grid.

regards,
Bala.K

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 21 Jul 2009, 12:26 PM
Hi BalaSubramanian,

Try the following client side code for positioning the pop-up editform to right.

ASPX:
 
<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1"
    <MasterTableView AutoGenerateColumns="False" DataSourceID="SqlDataSource1" EditMode="PopUp"
       . . . 
    </MasterTableView> 
    <ClientSettings> 
    <ClientEvents OnPopUpShowing="PopUpShowing" /> 
    </ClientSettings> 
</telerik:RadGrid> 

JavaScript:
 
<script type="text/javascript"
var popUp; 
function PopUpShowing(sender, eventArgs) 
   popUp = eventArgs.get_popUp(); 
   var gridWidth = sender.get_element().offsetWidth; 
   var gridHeight = sender.get_element().offsetHeight; 
   var popUpWidth = popUp.style.width.substr(0,popUp.style.width.indexOf("px")); 
   var popUpHeight = popUp.style.height.substr(0,popUp.style.height.indexOf("px")); 
   popUp.style.left = (gridWidth - popUpWidth) + "px"
</script> 

-Shinu.
Tags
Grid
Asked by
balasubramanian kanagaraj
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or