How to pop up a prompt dialog box after ASPxGridView is successfully deleted, added, and modified

Divided into several steps:

1. Add in the aspx file

function EndCallBack(s, e) {
    if (s.cpAlertMsg != "" && s.cpAlertMsg !=null) {
        alert(s.cpAlertMsg);
        s.cpAlertMsg = null; 
    } 

</script>

//Note that the cpAlertMsg here must start with a lowercase cp, and cannot be modified to anything else.

 

2. Add in ASPxGridView

<ClientSideEvents EndCallback="function(s, e) {EndCallBack(s,e);}" />

3. Add in aspx.cs

ASPxGridView1.JSProperties.Remove("cpAlertMsg");//Clear first

ASPxGridView1.JSProperties["cpAlertMsg"] = "Modified successfully"; 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324929929&siteId=291194637