I have implemented RadGrid in my project for displaying data. But facing one severe issue, when trying to post back or going to the next page, the pager control is shifting down. In order to fix Grid height and width according to the page height and width, i have implemented bellow java script in page load. But unfortunately after post back it is not working.
var grid, gridHeight;
gridHeight = document.documentElement.offsetHeight - 130;
grid = $find('<%= GridControl1.FindControl("RadGrid4").ClientID %>');
if(grid !== null){
contentPane.set_height(document.documentElement.offsetHeight - 90);
grid.get_element().style.height = gridHeight+ "px";
contentSplitter.repaint();
grid.repaint();
}
else{
grid = $get('<%= GridControl1.FindControl("RadGrid4").ClientID %>');
contentPane.set_height(document.documentElement.offsetHeight - 75);
grid.get_element().style.height = gridHeight+ "px";
contentSplitter.repaint();
grid.repaint();
}
Additionally in else section have tried to fix the height of grid by using bellow given java script, but unfortunately it is not working.
grid.get_element().style.height = gridHeight+ "px";
Kindly suggest, how to fix Grid height in post back so that pager control should not shift down or disappear.
Thanks in advance.
Dipak
What I have tried:
In else section have tried to fix the height of grid by using bellow given java script, but unfortunately it is not working.
grid.get_element().style.height = gridHeight+ "px";