The solution was to modify the client-side click definition a little:
If you don't add the "return false;" addendum then a postback occurs.
Here by the way is the Javascript code that this button calls:
var treeExpanded;
function buttonExpandCollapse_Click()
{
if (treeExpanded == null)
treeExpanded = false;
var button = $get('<%= buttonExpandCollapse.ClientID %>');
var treeView = <%= treeViewMain.ClientID %>;
// TreeView expand/collapse code here; varies depending on the type of treeview control
if (treeExpanded)
button.value = 'Expand All';
else
button.value = 'Collapse All';
treeExpanded = !treeExpanded;
}
No comments:
Post a Comment