I went through other messages in this thread but did not find similar question.
I am using Q1 2008 and I want to cancel the row-selecting event in some cases. here I have put a sample js method to call onrowselecting. looks like args.set_cancel(true) does not work at all. It should uncheck the checkbox that is being checked - but it does not do that. Also, if I click back on the checkbox which is already checked - it still calls - OnRowSelecting and OnRowSelected - instead of calling the Deselecting and DeSelected methods.
<ClientEvents OnRowSelecting="onRowSelecting" />
<Selecting AllowRowSelect="true" />
function onRowSelecting(sender, args)
{
if (confirm("Do you want to cancel this?") == true) args.set_cancel(true);
}
I am using Q1 2008 and I want to cancel the row-selecting event in some cases. here I have put a sample js method to call onrowselecting. looks like args.set_cancel(true) does not work at all. It should uncheck the checkbox that is being checked - but it does not do that. Also, if I click back on the checkbox which is already checked - it still calls - OnRowSelecting and OnRowSelected - instead of calling the Deselecting and DeSelected methods.
<ClientEvents OnRowSelecting="onRowSelecting" />
<Selecting AllowRowSelect="true" />
function onRowSelecting(sender, args)
{
if (confirm("Do you want to cancel this?") == true) args.set_cancel(true);
}