This handles the button click on a grid with more that one button
<ClientSideEvents CustomButtonClick="function(s, e) {
if (e.buttonID == 'gvCmdOpenDocument') {
e.processOnServer = false;
s.GetRowValues(e.visibleIndex, 'ItemURL', function(result) {
window.open(result);
});
}
else
{
e.processOnServer = false;
s.GetRowValues(e.visibleIndex, 'ListURL', function(result) {
window.open(result);
});
}
}" />