This is a migrated thread and some comments may be shown as answers.

[Solved] Different way about grid delete confirm?

0 Answers 127 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Nick Wu
Top achievements
Rank 1
Nick Wu asked on 11 Apr 2011, 10:17 AM
Because  web browser (such as "firefox" etc.) may prevent default  alert() and confirm()  to popup,   I want to use a uni-form alert and confirm in my project  using jquery-ui.
In grid "Editable" settings ,I set DisplayDeleteConfirmation(false) , and registe ClientEvents as OnDelete("grid_onDelete").
below is code design , but it's no correct.
function grid_onDelete(e)
{
 
var isConfirm = myUniConfirm("do you want to delete it?");
  if(isConfirm==false)
    e.preventDefault();
}
function myUniConfirm(msg)
{
  
var result;
 
//here popup jquery-ui dialog, but I can't realize it . :-(
  //result = confirm(msg);   //it's ok.
   return result;
}

Anybody can show me a sample?
Tags
Grid
Asked by
Nick Wu
Top achievements
Rank 1
Share this question
or