分为几步:

1、在aspx文件中添加

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

</script>

//注意,这里的cpAlertMsg,要求必须是小写cp开头,不可修改为其他。

 

2、在ASPxGridView中添加

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

3、在aspx.cs中添加

ASPxGridView1.JSProperties.Remove("cpAlertMsg");//先清空

ASPxGridView1.JSProperties["cpAlertMsg"] = "修改成功"; 

posted on 2018-04-26 14:48  qqhfeng16  阅读(258)  评论(0编辑  收藏  举报