Vimal Kumar
Top achievements
Rank 1
Vimal Kumar
asked on 31 Mar 2009, 10:34 AM
Hi There,
I am working on telerik. In which i have facilitate with virtual loading. And I am having nearly 800 data. I have given the page size as 35. I fell when ever the grid is getting load first time grid is showing with 9 data, but in one second the grid will come in its original size. I want when the grid get load first time, that time itself it should load in original size. Let me know whether this is possible or not. Can anybody help me on this....???
Regards:
Vimal Kumar Srivastava
Madhepura, Bihar
Email Id: vimaltech04@gmail.com
I am working on telerik. In which i have facilitate with virtual loading. And I am having nearly 800 data. I have given the page size as 35. I fell when ever the grid is getting load first time grid is showing with 9 data, but in one second the grid will come in its original size. I want when the grid get load first time, that time itself it should load in original size. Let me know whether this is possible or not. Can anybody help me on this....???
Regards:
Vimal Kumar Srivastava
Madhepura, Bihar
Email Id: vimaltech04@gmail.com
4 Answers, 1 is accepted
0
Hi Vimal Kumar,
I suppose that you have enabled scrolling with static headers. If this is the case, please set ScrollHeight in ClientSettings > Scrolling and remove the RadGrid Height, if you have one.
Best wishes,
Dimo
the Telerik team
Check out Telerik Trainer , the state of the art learning tool for Telerik products.
I suppose that you have enabled scrolling with static headers. If this is the case, please set ScrollHeight in ClientSettings > Scrolling and remove the RadGrid Height, if you have one.
Best wishes,
Dimo
the Telerik team
Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Vimal Kumar
Top achievements
Rank 1
answered on 01 Apr 2009, 09:56 AM
Hi Dimo,
Thanks for your reply. But i don't want to set the static scroll height, as i use to check it in all resolution. So, Is there any way to set the scroll height in javascript. The javaScript i am using is below, Can u please recode it:
Waiting for your reply........!!!
Regards:
Vimal Kumar Srivastava
Softsmith Infotech Pvt. Ltd.
Email Id: vimalk@softsmith.com
Thanks for your reply. But i don't want to set the static scroll height, as i use to check it in all resolution. So, Is there any way to set the scroll height in javascript. The javaScript i am using is below, Can u please recode it:
<script type="text/javascript"> |
window.onresize = GridCreated; |
var browser=navigator.appName; // Get Browser Name |
var b_full_version=navigator.appVersion; // Get Browser Details |
var b_version=parseFloat(b_full_version); // Get Browser version |
var func; |
var scrollArea, |
h = 0; |
w = 0; |
gwidth = 80+40+100+35+70+70+70+250+75+70+90+90+90+75+90+90; |
//resize the window |
function GridCreated() |
{ |
//Check the window height and set the window width and height |
if(!(document.documentElement.clientWidth == 0)) |
{ |
w = document.documentElement.clientWidth; |
h = document.documentElement.clientHeight; |
} |
else |
{ |
w = document.body.clientWidth; |
h = document.body.clientHeight; |
} |
//Get Grid Object |
grid = document.getElementById('<%=rgIssueList.ClientID %>'); |
//Get Scroll Area |
scrollArea = document.getElementById("<%= rgIssueList.ClientID %>" + "_GridData"); |
//Get grid data height |
var dataHeight = document.getElementById("ctl00_ContentPlaceHolder1_rgIssueList_ctl00"); |
if(browser=="Microsoft Internet Explorer") |
{ |
//set grid height |
if(h-335 > 20) |
{ |
//Check the grid row is less than 15 |
if(dataHeight.clientHeight < 200) |
{ |
//alert("vimal"); |
scrollArea.style.height = dataHeight.clientHeight + 10 + "px"; |
scrollArea.style.overflow = "auto"; |
} |
else |
{ |
if(h > 800 && dataHeight.clientHeight < 700) |
{ |
scrollArea.style.height = dataHeight.clientHeight + "px"; |
scrollArea.style.overflow = "auto"; |
} |
else |
{ |
scrollArea.style.height = (h - 320) + "px"; |
scrollArea.style.overflow = "auto"; |
} |
} |
} |
//set grid width |
if(w-540 > 100) |
{ |
if(w > gwidth ) |
{ |
grid.style.width = gwidth + 15 + "px"; |
grid.style.overflow = "hidden"; |
} |
else |
{ |
grid.style.width = (w - 40) + "px"; |
grid.style.overflow = "hidden"; |
} |
} |
else |
{ |
} |
} |
if(browser=="Netscape") |
{ |
//set grid height |
if ((screen.width<=1280) && (screen.height<=768)) |
{ |
//set grid height |
if(h-335 > 20) |
{ |
if(dataHeight.clientHeight < 100) |
{ |
scrollArea.style.height = dataHeight.clientHeight + 20 + "px"; |
scrollArea.style.overflow = "auto"; |
} |
else |
{ |
if(h > 100 && dataHeight.clientHeight < 180) |
{ |
scrollArea.style.height = dataHeight.clientHeight + "px"; |
scrollArea.style.overflow = "auto"; |
} |
else |
{ |
scrollArea.style.height = (h - 300) + "px"; |
scrollArea.style.overflow = "auto"; |
} |
} |
} |
} |
else |
{ |
//set grid height |
if(h-435 > 100) |
{ |
if(dataHeight.clientHeight < 180) |
{ |
scrollArea.style.height = dataHeight.clientHeight + 20 + "px"; |
scrollArea.style.overflow = "auto"; |
} |
else |
{ |
if(h > 800 && dataHeight.clientHeight < 700) |
{ |
scrollArea.style.height = dataHeight.clientHeight + "px"; |
scrollArea.style.overflow = "auto"; |
} |
else |
{ |
scrollArea.style.height = (h - 400) + "px"; |
scrollArea.style.overflow = "auto"; |
} |
} |
} |
} |
//set grid width |
if(w-540 > 100) |
{ |
if(w > gwidth ) |
{ |
grid.style.width = gwidth - 20 + "px"; |
grid.style.overflow = "hidden"; |
} |
else |
{ |
grid.style.width = (w - 30) + "px"; |
grid.style.overflow = "hidden"; |
} |
} |
} |
} |
</script> |
Regards:
Vimal Kumar Srivastava
Softsmith Infotech Pvt. Ltd.
Email Id: vimalk@softsmith.com
0
Hello Vimal,
I am afraid that your implementation is too complicated. You can set height directly to the RadGrid scrollable area, however, the control can do the same thing automatically. So a better approach is to set height to the RadGrid <div> and call the repaint() method:
Javascript
var grid = $find('<%=rgIssueList.ClientID %>');
grid.get_element().style.width = ..... + "px";
grid.get_element().style.height = ..... + "px";
grid.repaint();
The additional Javascript size calculations are a matter of your preference.
Greetings,
Dimo
the Telerik team
Check out Telerik Trainer , the state of the art learning tool for Telerik products.
I am afraid that your implementation is too complicated. You can set height directly to the RadGrid scrollable area, however, the control can do the same thing automatically. So a better approach is to set height to the RadGrid <div> and call the repaint() method:
Javascript
var grid = $find('<%=rgIssueList.ClientID %>');
grid.get_element().style.width = ..... + "px";
grid.get_element().style.height = ..... + "px";
grid.repaint();
The additional Javascript size calculations are a matter of your preference.
Greetings,
Dimo
the Telerik team
Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
senthil
Top achievements
Rank 1
answered on 06 Apr 2009, 09:36 AM
This repaint() method works fine for height resize,but empty space is there if no data is there. Also width getting resize but not getting scroll bar.Please reply this if anybody have idea on it.
Thanks and Regards,
Senthil Kumar.T
mailto:senthil153@gmail.com
Thanks and Regards,
Senthil Kumar.T
mailto:senthil153@gmail.com