Hi all! I hope someone can help me with this...
I have a radgrid within a tab/pageview displaying a list of records.
I'm using the pageLoad() function to calculate the window height and resize the grid accordingly:
This works fine when first loaded. When clicking a record in the grid, another tab is opened for viewing and editing the record.
When the record is saved, I'm trying to refresh the grid in the "opener" tab by calling a function that essentially causes a postback.
(openerTabIndex is a variable I pass around to keep track of the correct tab).
The problem is that the window height is being returned as 0 in IE8 when the pageLoad() function is called again, which is resulting in a javascript bomb.
Can anyone help me resolve this, or suggest a better way of achieving the same results?
Cheers
Rich
I have a radgrid within a tab/pageview displaying a list of records.
I'm using the pageLoad() function to calculate the window height and resize the grid accordingly:
function pageLoad() {
var $ = $telerik.$;
var height = $(window).height();
if (height == 0) {
alert('0 height');
} else {
var totalHeight = height - 118;
document.getElementById('rGrid_GridData').style.height = totalHeight + "px";
}
}
This works fine when first loaded. When clicking a record in the grid, another tab is opened for viewing and editing the record.
When the record is saved, I'm trying to refresh the grid in the "opener" tab by calling a function that essentially causes a postback.
(openerTabIndex is a variable I pass around to keep track of the correct tab).
function doRefreshOpener(openerTabIndex) {
var openerPageView = window.top.getTabPageView(openerTabIndex);
$telerik.getChildrenByTagName(openerPageView.get_element(), "iframe")[0].contentWindow.refreshPage();
}
function refreshPage() {
__doPostBack('btnHiddenRefresh', '');
}
The problem is that the window height is being returned as 0 in IE8 when the pageLoad() function is called again, which is resulting in a javascript bomb.
Can anyone help me resolve this, or suggest a better way of achieving the same results?
Cheers
Rich