问题描述
我想问一下,ItemDatabound中的代码在IE 11.0.9600.18538中具有空引用。 这是我的NullReference代码:
if (e.Item is GridDataItem)
{
GridDataItem dataItem = (GridDataItem)e.Item;
if ((!dataItem["Status"].Text.Equals("DONE") && !dataItem["Status"].Text.Equals("ALMOST DONE")))
{
dataItem["BtnUpdate"].Controls[0].Visible = false;
(dataItem["Delete"].Controls[0] as Button).Attributes["onclick"] = null;
}
}
在此代码中,仅在IE版本11.0.9600.18538中具有错误NullReference。
(dataItem["Delete"].Controls[0] as Button).Attributes["onclick"] = null;
在IE版本11.0.9600.18538中,此按钮不显示。
dataItem["BtnUpdate"].Controls[0].Visible = false;
<telerik:GridButtonColumn UniqueName="Delete" ButtonType="FontIconButton" CommandName="Delete" ConfirmText="Are you sure you want to send this deletion for approval?" ConfirmDialogType="radwindow"/>
基于我的代码,我想在状态为“已完成”和“即将完成”时显示确认,但在状态为“草稿和待处理”时不显示。 所有代码都可以在IE更新版本和Google Chrome中正常工作。
任何人都可以帮忙吗?预先感谢!
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)