Same setup; a UserControl with a grid which has a ToolBar as the CommandItem.
I'm reacting to events on my calling page to enable/disable buttons on the ToolBar using code like this ...
Where "GridCommandItem" is a reference to the ToolBar.
Now, this works but only without the AjaxRequest call. The button is enabled and subsequent postbacks honour the enabled state of the control. However, my handler for the "ShowDocuments" AjaxRequest calls ReBind() on the Grid control and this resets the state of the ToolBar buttons.
Why? And what can I do about it?
--
Stuart
I'm reacting to events on my calling page to enable/disable buttons on the ToolBar using code like this ...
function NodeClicked(sender, args) { |
var node = args.get_node(); |
if (GridCommandItem != null) { |
GridCommandItem.trackChanges(); |
var btn = GridCommandItem.findItemByValue("doStuff"); |
btn.set_enabled(true); |
GridCommandItem.commitChanges(); |
} |
AjaxRequest("ShowDocuments;" + node.get_value()); |
} |
Now, this works but only without the AjaxRequest call. The button is enabled and subsequent postbacks honour the enabled state of the control. However, my handler for the "ShowDocuments" AjaxRequest calls ReBind() on the Grid control and this resets the state of the ToolBar buttons.
Why? And what can I do about it?
--
Stuart