As usual I'm on a deadline and tinkering with aspects of Telerik I don't fully understand.
I've been looking at your splitter demo (http://demos.telerik.com/aspnet-ajax/splitter/examples/clientsideapi/defaultcs.aspx)
I have a form with regions divided up by splitters.
Like your demo I need to be able to expand and collapse the end pane in Javascript, depending on the value set in a combobox.
Unlike your demo, the page is supposed to start off with the endpane collapsed. The toggle in my checkForValue function when the pane is initially collapsed, initially didn't work.
To fix this, on the server side, in the Page_Load event, to initially expand the pane, I put:
RadPaneEnd.Width = new System.Web.UI.WebControls.Unit("55%");
On the client side, I put this, to fire on load, and collapse the pane:
$(document).ready(function () {
var splitter = $find("<%=RadSplitter1.ClientID%>");
var endPane = splitter.getEndPane();
endPane.collapse(Telerik.Web.UI.SplitterDirection.Backward);
})
The expand/collapse function itself is:
function checkForValue(sender, args) {
var splitter = $find("<%=RadSplitter1.ClientID%>");
var endPane = splitter.getEndPane();
var curVal = sender.get_text();
if (curVal == 'Value1') {
endPane.expand(Telerik.Web.UI.SplitterDirection.Backward);
}
else {
endPane.collapse(Telerik.Web.UI.SplitterDirection.Backward);
}
}
I've been looking at your splitter demo (http://demos.telerik.com/aspnet-ajax/splitter/examples/clientsideapi/defaultcs.aspx)
I have a form with regions divided up by splitters.
Like your demo I need to be able to expand and collapse the end pane in Javascript, depending on the value set in a combobox.
Unlike your demo, the page is supposed to start off with the endpane collapsed. The toggle in my checkForValue function when the pane is initially collapsed, initially didn't work.
To fix this, on the server side, in the Page_Load event, to initially expand the pane, I put:
RadPaneEnd.Width = new System.Web.UI.WebControls.Unit("55%");
On the client side, I put this, to fire on load, and collapse the pane:
$(document).ready(function () {
var splitter = $find("<%=RadSplitter1.ClientID%>");
var endPane = splitter.getEndPane();
endPane.collapse(Telerik.Web.UI.SplitterDirection.Backward);
})
The expand/collapse function itself is:
function checkForValue(sender, args) {
var splitter = $find("<%=RadSplitter1.ClientID%>");
var endPane = splitter.getEndPane();
var curVal = sender.get_text();
if (curVal == 'Value1') {
endPane.expand(Telerik.Web.UI.SplitterDirection.Backward);
}
else {
endPane.collapse(Telerik.Web.UI.SplitterDirection.Backward);
}
}