New to Telerik UI for ASP.NET AJAXStart a free 30-day trial

RadToolBar as Command Item

This example demonstrates how to use RadToolBaras a custom RadGridCommand item container. The buttons in the toolbar have CommandName values set which are internally 'recognized' by the grid when its event bubbling mechanism is triggered (after pressing a button from the command item toolbar). Thus the respective command is executed without any extra coding.

Below is a code extraction from the relevant online demo in the RadGrid:

JavaScript
function onToolBarClientButtonClicking(sender, args) {
  var button = args.get_item();
  if (button.get_commandName() == "DeleteSelected") {
    args.set_cancel(!confirm('Delete all selected customers?'));
  }
}

Additional information about the event bubbling mechanism of RadGrid for ASP.NET AJAX can be found here: Command reference

Not finding the help you need?
Contact Support