Posted
on Mar 23, 2011
(permalink)
Hi Telerik Admins,
I am actually using this SplitterLoaded() function recommended by you to resize my RadSplitter initially.
function SplitterLoaded(splitter, arg) {
alert('<%= mainPane.ClientID %>');
var pane = splitter.getPaneById('<%= mainPane.ClientID %>');
var height = pane.getContentElement().scrollHeight;
splitter.set_height(height);
pane.set_height(height);
}
I was just wondering how do you execute the same function on subsequent ajax calls event. When I am actually clicking on the different Page Numbers of my asp.net Gridview control, I do have to calculate the height of the RadSplitter again because sometimes, the GridView height changes and becomes larger than the RadSplitter height set initially (which results in blinding some of the bottom parts of the grid view control).
So one of the idea that I thought is to call the SplitterLoaded() function in the OnPageIndexChanging event
string script = "SplitterLoaded(" + radSplitter + ", " + null + ");";
ScriptManager.RegisterStartupScript(updatePanelGridViewDefects, typeof(string), "key", script, true);
- I'm sure the Eventargs of RadSplitter should not be null, but I have actually no idea of how to get the args object at this stage.
Might be there's a better way of doing it also ?
Thanks for your help!