I have a RadToolBar in the CommandItemTemplate of a RadGrid. I would like to (client-side) disable a button upon row click. On row click I loop through the tool bar's items and disable the button I want. This works but only disables the button on the top of the grid. The command items at the bottom of the grid are left alone. How can I disable both the top and bottom button?
function
grdViewToolRecords_RowClicked(sender, args) {
var
toolBar = $telerik.findControl(sender.get_element(),
"rtbViewToolRecords"
);
var
toolBarItems = toolBar.get_allItems();
var
i = 0;
while
(i < toolBarItems.length) {
if
(toolBarItems[i].get_text() ==
"Check Out"
) {
toolBarItems[i].disable();
}
i++;
}
toolBar.commitChanges();
}