aspxgridview CustomButtonCallback 不支持弹出消息提示解决方法


protected void ASPxGridView1_CustomButtonCallback(object sender, ASPxGridViewCustomButtonCallbackEventArgs e)
{
ASPxGridView view = sender as ASPxGridView;
if (e.ButtonID == "btnAudit")
{
int id = 0;
int.TryParse(view.GetRowValues(e.VisibleIndex, "id").ToString(), out id);
if (true)
{
view.JSProperties["cpErrorMsg"] = "审核成功!";
view.DataBind();
}
else
{
view.JSProperties["cpErrorMsg"] = "此单据已经审核!";
}
}
}


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

posted @ 2016-07-25 17:35  郭梁春  阅读(424)  评论(0)    收藏  举报