
Atchyut Bandaru
Top achievements
Rank 1
Atchyut Bandaru
asked on 13 Oct 2010, 10:33 AM
Hello Dimo,
Please can you respose for following tow issue. I will thanks and advance.
- RadGrid Edit in pop Mode, I am getting scroll bar for the browser when the popup opens.. Can you please send some solution to resolve this?
- When I am using Update Panel for the page in which rad controls are there, I am getting JavaScript errors. But if I am not using Update Panel, everything is working fine. Can you please send some solution to resolve this?
3 Answers, 1 is accepted
0
Hi Atchyut,
Here is my demo, which works as expected and which I sent to you in the support ticket.
Please avoid sending duplicate support tickets and forum threads.
Greetings,
Dimo
the Telerik team
Here is my demo, which works as expected and which I sent to you in the support ticket.
Please avoid sending duplicate support tickets and forum threads.
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Data" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<
script
runat
=
"server"
>
protected void RadGrid_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
DataTable dt = new DataTable();
DataRow dr;
int colsNum = 4;
int rowsNum = 6;
string colName = "Column";
for (int j = 1; j <= colsNum; j++)
{
dt.Columns.Add(String.Format("{0}{1}", colName, j));
}
for (int i = 1; i <= rowsNum; i++)
{
dr = dt.NewRow();
for (int k = 1; k <= colsNum; k++)
{
dr[String.Format("{0}{1}", colName, k)] = String.Format("{0}{1} Row{2}", colName, k, i);
}
dt.Rows.Add(dr);
}
(sender as RadGrid).DataSource = dt;
}
</
script
>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
meta
http-equiv
=
"content-type"
content
=
"text/html;charset=utf-8"
/>
<
title
>RadControls</
title
>
<
style
type
=
"text/css"
>
html,body,form
{
height:100%;
margin:0;
padding:0;
}
</
style
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
asp:ScriptManager
ID
=
"ScriptManager1"
runat
=
"server"
/>
<
asp:UpdatePanel
ID
=
"UpdatePanel1"
runat
=
"server"
>
<
ContentTemplate
>
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
Width
=
"800px"
AutoGenerateEditColumn
=
"true"
OnNeedDataSource
=
"RadGrid_NeedDataSource"
>
<
MasterTableView
EditMode
=
"PopUp"
>
<
EditFormSettings
>
<
PopUpSettings
Width
=
"500px"
Height
=
"200px"
/>
</
EditFormSettings
>
</
MasterTableView
>
<
ClientSettings
>
<
ClientEvents
OnPopUpShowing
=
"MyPopUpShowing"
/>
</
ClientSettings
>
</
telerik:RadGrid
>
</
ContentTemplate
>
</
asp:UpdatePanel
>
<
telerik:RadCodeBlock
ID
=
"RadCodeBlock1"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
var popUp;
window.onresize = centerPopUp;
function MyPopUpShowing(sender, eventArgs)
{
popUp = eventArgs.get_popUp();
centerPopUp();
}
function centerPopUp()
{
if (!popUp)
return;
var popUpWidth = parseInt(popUp.style.width, 10);
var popUpHeight = parseInt(popUp.style.height, 10);
var scrollTop = document.body.scrollTop;
var scrollLeft = document.body.scrollLeft;
var viewPortHeight = document.body.clientHeight;
var viewPortWidth = document.body.clientWidth;
if (document.compatMode == "CSS1Compat")
{
viewPortHeight = document.documentElement.clientHeight;
viewPortWidth = document.documentElement.clientWidth;
if (!$telerik.isSafari)
{
scrollTop = document.documentElement.scrollTop;
scrollLeft = document.documentElement.scrollLeft;
}
}
popUp.style.left = scrollLeft + (viewPortWidth - popUpWidth)/2 + "px";
popUp.style.top = scrollTop + (viewPortHeight - popUpHeight)/2 + "px";
}
</
script
>
</
telerik:RadCodeBlock
>
</
form
>
</
body
>
</
html
>
Greetings,
Dimo
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0

Atchyut Bandaru
Top achievements
Rank 1
answered on 27 Oct 2010, 03:11 PM
Hello Dimo,
First I want to say thanks for quick response I implmented the code for following queastion its working fine.
When changing screen resolution, I am unable to set the RadGrid Edit popup position to center. Can you please send some solution to resolve this?
First I want to say thanks for quick response I implmented the code for following queastion its working fine.
Please can you response me for following issue
Queastion : RadGrid Edit in pop Mode, I am getting horizental scroll bar for the browser when the popup opens.. Can you please send some solution to resolve this?
for above question you sent code related to html but we are using aspx code, so please can you response me as soon as possible for above queastion.
Thanks and Regards,
Atchyut
0
Hi Atchyut Bandaru,
>> When changing screen resolution, I am unable to set the RadGrid Edit popup position to center. Can you please send some solution to resolve this?
You should subscribe to the window.resize event and execute the positioning script again.
>> I am getting horizental scroll bar for the browser when the popup opens.
You will have to send me a simple test page, which reproduces this, similar to the page I provided earlier.
Greetings,
Dimo
the Telerik team
>> When changing screen resolution, I am unable to set the RadGrid Edit popup position to center. Can you please send some solution to resolve this?
You should subscribe to the window.resize event and execute the positioning script again.
>> I am getting horizental scroll bar for the browser when the popup opens.
You will have to send me a simple test page, which reproduces this, similar to the page I provided earlier.
Greetings,
Dimo
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items