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

Grid GridEditCommandColumn

1 Answer 46 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Prabha
Top achievements
Rank 1
Prabha asked on 12 Jul 2014, 11:36 AM
Hi All,

I have to call Confirm message when Editbutton click on GridEditCommandColumn.

that is, In ItemCommand event ->CommandName=="Update" -> I will check one condition, if that will be true means , it will show a javascript confirm message.

 if (IsTrue==true)
{
                            Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "javascript::if(!confirm(Delete the row?));", true);               

      if user click ok 
      {
          //my code
       }
       else
            return;
 }

how to do this?

1 Answer, 1 is accepted

Sort by
0
RajaLakshmi
Top achievements
Rank 1
answered on 14 Jul 2014, 03:41 AM
Hi Prabha,
    on client item command
if( e.commandName =='UPDATE'){
var status = Confirm(Your text);
if(status){
//your code;
}
}
Tags
Grid
Asked by
Prabha
Top achievements
Rank 1
Answers by
RajaLakshmi
Top achievements
Rank 1
Share this question
or