on data命令的datagrid值消失 [英] on item command of datagrid values vanishes
本文介绍了on data命令的datagrid值消失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我有一个datagrid和item命令我用javascript调用了一个确认窗口。点击ok或取消使用的类的对象给出null引用错误。
Hi All,
I have a datagrid and on item command I have called a confirm window with javascript .and on click of ok or cancel the object of class used gives null reference error.
protected void rgrdSearchSet_ItemCommand(object source, GridCommandEventArgs eventArgs)
{
if (eventArgs.CommandName == "SearchSet")
{
int projectId = Common.Common.CurrentSearchCriteria.ProjectId;
string Message = SearchDb.CheckTagIdExistenceInSearchSet(searchSetId, projectName);
if (!string.IsNullOrEmpty(Message))
{
string record = string.Empty;
string radalertscript = "<script language='javascript'>function f(){ radconfirm('Tag Ids utilised in Search Set no more exists ', CheckTagId, 330, 100,null,'EXEGO Confirmation') ; Sys.Application.remove_load(f);}; Sys.Application.add_load(f);</script>";
Page.ClientScript.RegisterStartupScript(this.GetType(), "radalert", radalertscript);
eventArgs.Canceled = true;
}
else
{
Common.Common.CurrentSearchCriteria = WorkFlow.SetSearchSetFilterCriteria(searchSetId, projectName,
Common.Common.UserId,
projectId, batchList, false);
}
}
}
点击是或否确认按钮
它给出空值参考。
推荐答案
这篇关于on data命令的datagrid值消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文