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";