
Palanivelrajan
Top achievements
Rank 1
Palanivelrajan
asked on 22 Mar 2013, 12:34 PM
Dear All,
I am using Telerik RAD Grid in my ASP.NET Application. The aspx form has more control so vertical scroll is enabled. when RAD Grid is in bottom or due to more data in the grid, current position of the form is at the bottom with scrolled down. if I add new item to grid, Edit Form is not visible, since it is appearing at the top of the form which is not in visible to user.
The code I used for EditFOrm Popup is given below.
I tried with the following code which is not working in RAD Windows (My form is part of RAD Windows and appear like modal popup) and in normal form also it is misbehaving.
Kindly Requesting your guidance on the same.
With Regards
Palanivelrajan.L
I am using Telerik RAD Grid in my ASP.NET Application. The aspx form has more control so vertical scroll is enabled. when RAD Grid is in bottom or due to more data in the grid, current position of the form is at the bottom with scrolled down. if I add new item to grid, Edit Form is not visible, since it is appearing at the top of the form which is not in visible to user.
The code I used for EditFOrm Popup is given below.
popUp = eventArgs.get_popUp();
popUp.style.position =
"fixed"
;
var
gridWidth = sender.get_element().offsetWidth - 100;
var
gridHeight = sender.get_element().offsetHeight + 400;
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) / 2 + sender.get_element().offsetLeft).toString() +
"px"
;
popUp.style.top = ((gridHeight) / 2 + sender.get_element().offsetTop).toString() +
"px"
;
I tried with the following code which is not working in RAD Windows (My form is part of RAD Windows and appear like modal popup) and in normal form also it is misbehaving.
var
myWidth = 0, myHeight = 0;
if
(
typeof
(window.innerWidth) ==
'number'
)
{
myWidth = window.innerWidth;
myHeight = window.innerHeight;
}
else
if
(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight))
{
//IE 6+ in 'standards compliant mode'
myWidth = document.documentElement.clientWidth;
myHeight = document.documentElement.clientHeight;
}
else
if
(document.body && (document.body.clientWidth || document.body.clientHeight))
{
//IE 4 compatible
myWidth = document.body.clientWidth;
myHeight = document.body.clientHeight;
}
popUp = eventArgs.get_popUp();
popUp.style.position =
"fixed"
;
var
gridWidth = myWidth;
var
gridHeight = myHeight;
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) / 2) +
"px"
;
popUp.style.top = ((gridHeight - popUpHeight) / 2) +
"px"
;
Kindly Requesting your guidance on the same.
With Regards
Palanivelrajan.L
9 Answers, 1 is accepted
0

Palanivelrajan
Top achievements
Rank 1
answered on 25 Mar 2013, 11:16 AM
Dear All,
I need you guidance on the above issue
with ragards
Palanivelrajan
I need you guidance on the above issue
with ragards
Palanivelrajan
0
Hello Palanivelrajan,
If I understand correctly you want to set the RadWindow scrolled to a certain position of the content upon load. This is not functionality of the RadWindow but rather your own page as explained in this forum post. In order to achieve this you will have to use the scrollTo browser method and set a vertical offset which fits your requirements. To demonstrate this I have created a sample project in which when the window is initially opened it is scrolled to a certain point. This example should help you to modify your logic accordingly.
All the best,
Angel Petrov
the Telerik team
If I understand correctly you want to set the RadWindow scrolled to a certain position of the content upon load. This is not functionality of the RadWindow but rather your own page as explained in this forum post. In order to achieve this you will have to use the scrollTo browser method and set a vertical offset which fits your requirements. To demonstrate this I have created a sample project in which when the window is initially opened it is scrolled to a certain point. This example should help you to modify your logic accordingly.
All the best,
Angel Petrov
the Telerik team
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 their blog feed now.
0

Palanivelrajan
Top achievements
Rank 1
answered on 01 Apr 2013, 05:39 AM
Dear Telerik Team,
I am using Telerik RAD Grid both in RAD Windows and in Aspx Web Form. My requirement is when the apsx for / RAD Window For has more input control in addition to RAD Grid, vertical Scroll BAR is enabled. if I scroll down to RAD Grid control which is at the bottom of the form and try to add value using RAD Grid Edit Form, it is not appearing center of the current position.
or
When the aspx form/RAD Windows has vertical scroll, I want my GRID EDIT Form popup Window to center of the Current scroll position.
I tried with the solution mentioned in the first posting. that time Edit Form Popup is not working in RAD windows, since it is appearing at the background of the RAD Popup. Edit Form popup is not modal (ie not appearing front/top of all windows with others are disabled..)
On setting position Fixed for Edit Form popup, all control placed inside does not appear in the EDIT Form popup rather it appear in the inside the grid respective row which is placed on RAD WINDOW.
With Regards
I am using Telerik RAD Grid both in RAD Windows and in Aspx Web Form. My requirement is when the apsx for / RAD Window For has more input control in addition to RAD Grid, vertical Scroll BAR is enabled. if I scroll down to RAD Grid control which is at the bottom of the form and try to add value using RAD Grid Edit Form, it is not appearing center of the current position.
or
When the aspx form/RAD Windows has vertical scroll, I want my GRID EDIT Form popup Window to center of the Current scroll position.
I tried with the solution mentioned in the first posting. that time Edit Form Popup is not working in RAD windows, since it is appearing at the background of the RAD Popup. Edit Form popup is not modal (ie not appearing front/top of all windows with others are disabled..)
On setting position Fixed for Edit Form popup, all control placed inside does not appear in the EDIT Form popup rather it appear in the inside the grid respective row which is placed on RAD WINDOW.
With Regards
0

Palanivelrajan
Top achievements
Rank 1
answered on 01 Apr 2013, 10:01 AM
Dear All,
Request solutions for the same.
With Regards
Palanivelrajan
Request solutions for the same.
With Regards
Palanivelrajan
0
Hi Palanivelrajan,
On how to position the edit popup form of the grid I suggest that you examine this code library. Additionally in my previous post I demonstrated how you can scroll the window on initial load. By integrating both my suggestion and the knowledge provided in the code library you should be able to make things work correctly on your side.
Please note that this is a custom scenario and we do not have a ready project that demonstrates a possible realization. It is a developer's responsibility to overwhelm such problems.
All the best,
Angel Petrov
the Telerik team
On how to position the edit popup form of the grid I suggest that you examine this code library. Additionally in my previous post I demonstrated how you can scroll the window on initial load. By integrating both my suggestion and the knowledge provided in the code library you should be able to make things work correctly on your side.
Please note that this is a custom scenario and we do not have a ready project that demonstrates a possible realization. It is a developer's responsibility to overwhelm such problems.
All the best,
Angel Petrov
the Telerik team
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 their blog feed now.
0

Palanivelrajan
Top achievements
Rank 1
answered on 04 Apr 2013, 02:44 PM
Dear Angel Petrov,
Thank you very much for your input. Let me try that tomorrow.
I have attach the word file which has screen shot of the problem for your reference. requesting you to review and give the solution
Thanks and regards
Palanivelrajan.L
Thank you very much for your input. Let me try that tomorrow.
I have attach the word file which has screen shot of the problem for your reference. requesting you to review and give the solution
Thanks and regards
Palanivelrajan.L
0

Palanivelrajan
Top achievements
Rank 1
answered on 24 Apr 2013, 05:10 AM
Dear Angel Petrov,
I downloded the sample but I could not use it. since I am having RAD ASP.NET AJAX Q3 2010 SP2 version. it uses Telerik.Web.UI dll
Radgrid in the following code show error. I think it expect latest elerik.Web.UI dll
refer [TargetControlType(typeof(Telerik.Web.UI.RadGrid))]
How to over come this problem, since we have older version.
Requesting you to provide work around for position the popup edit form on the center of the visible form where rad grid is placed.
It is required while adding the row as well as edit the row in the RAD Grid.
Thanks and regards
Palanivelrajan
I downloded the sample but I could not use it. since I am having RAD ASP.NET AJAX Q3 2010 SP2 version. it uses Telerik.Web.UI dll
Radgrid in the following code show error. I think it expect latest elerik.Web.UI dll
refer [TargetControlType(typeof(Telerik.Web.UI.RadGrid))]
How to over come this problem, since we have older version.
Requesting you to provide work around for position the popup edit form on the center of the visible form where rad grid is placed.
It is required while adding the row as well as edit the row in the RAD Grid.
Thanks and regards
Palanivelrajan
0

Palanivelrajan
Top achievements
Rank 1
answered on 26 Apr 2013, 05:03 AM
Dear Angel Petrov,
Kindly requesting you to guide me on this issue.
Thanks and regards
Palanivelrajan.L
Kindly requesting you to guide me on this issue.
Thanks and regards
Palanivelrajan.L
0
Hello Palanivelrajan,
You should not experience problems running the example provided. Note that I have removed the dll files from the project and you should include them back in order to run the web site. This is not a version issue since I have tested the solution using the version you mentioned and all appears to work fine on my end. Please test the fully runnable project which you can find in attachments.
As for the problem on hand I suggest that you try integrating my suggestions in your project. Please note that providing solutions for custom projects is out of our support scope.
Regards,
Angel Petrov
the Telerik team
You should not experience problems running the example provided. Note that I have removed the dll files from the project and you should include them back in order to run the web site. This is not a version issue since I have tested the solution using the version you mentioned and all appears to work fine on my end. Please test the fully runnable project which you can find in attachments.
As for the problem on hand I suggest that you try integrating my suggestions in your project. Please note that providing solutions for custom projects is out of our support scope.
Regards,
Angel Petrov
the Telerik team
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 their blog feed now.