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

how to keep popup radwindow centered and keep centered while scroll radgrid?

1 Answer 135 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Amy Liu
Top achievements
Rank 1
Amy Liu asked on 06 Sep 2011, 04:45 PM
Hello!

I used a radwindow to show detail and use wnd.Center() to center the popup radwindow.
The problem is that when I choose 50 rows and scroll the grid the popup window (position fixed to the grid) also move with the grid to the top.

I checked all the answers telerik master posted. one is using

 

 

.RadWindow

 {  

 

height:200px;

position: fixed !important;

}

The solution works only for a few top records. when bottom record is clicked the window won't be shown ( I think it maybe shown somewhere which I can't see) and the whole grid page is grayed out.

I don't know how to solve the problem. please help.
My code is code for reference. Thanks again.

        function ShowDetail(sender, args) {
            var id = args.getDataKeyValue("RowID");
            var wnd = window.radopen("CommLogDetail.aspx?RowID=" + id, "RecordDetailWindow");
            wnd.Center();
}
    <script type="text/javascript">
        .RadWindow
        
            height:200px;
            position: fixed !important;
            
        }
    </script>
  
// and I also try to merge these codes into it ( another solution)  which doesn't work.
        function ShowDetail(sender, args) {
            var id = args.getDataKeyValue("RowID");
            var wnd = window.radopen("Detail.aspx?RowID=" + id, "RecordDetailWindow");
            //wnd.Center();
            GetSelectedWindow();
            PositionWindow();
        }
        function GetSelectedWindow() {
            var oManager = GetRadWindowManager();
            return oManager.getActiveWindow();
        }
  
        function PositionWindow() {
  
            var oWindow = GetSelectedWindow();
            if (!oWindow) {
                return;
            }
////
            <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true">
                <Windows>
                    <telerik:RadWindow ID="RecordDetailWindow" runat="server" Title="Record Detail" Height="700px"
                        Width="900px" ReloadOnShow="true" ShowContentDuringLoad="false" Modal="true"
                        CssClass="RadWindow" />
                </Windows>
            </telerik:RadWindowManager>

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 07 Sep 2011, 04:53 AM
Hello Amy,

Try changing the code like below.
Javascript:
function PositionWindow ()  
    var oWindow = GetSelectedWindow();   
    if (!oWindow)
   
        return
    
oWindow.center(); 
}

Thanks,
Shinu.
Tags
Grid
Asked by
Amy Liu
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or