Hi,
I have a grid using a button column for deleting.
I am binding the server side event OnClickCellButton which performs the delete to the model on the server side
I am binding the client side event ClickCellButtonHandler to this:
<ClientSideEvents CellChangeHandler="DeleteClicked" />
function DeleteClicked(gn,cid)
{
if(!confirm("Are you sure you want to delete?"))
igtbl_cancelPostBack(gn);
return false;
}
When I click the delete button, and cancel the modal action (or approve it) - the server side event still triggers and I end up with a post back. How do I prevent this post back from occuring?
P.S. - grid version: 8.1.20081.1000
Thanks in advance!
If you ask for confirmation in the BeforeDelete handler instead, it will work correctly (without having to call igtbl_cancelPostBack).
This KB article explains it: http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=3496 .
Wow - my mistake - I was using CellChangeHandler instead of ClickCellButtonHandler for the client side event.
Thanks for your response.