MDI中子窗体中有DataGrid,当子窗体的DataGrid没有数据时,获取的DataGrid能成功,但当子窗体的DataGrid数据不为空的时候,提示DataGrid转换错误,有原码,在线等,急急!!Form Ac=this.ActiveMdiChild;
if(Ac!=null)
DataGrid dg=(DataGrid)Ac.ActiveControl;当子窗体的DataGrid数据为空时,能转换过来,当子窗体的DataGrid数据不为空时提示不是有效转换,程序运行错;
if(Ac!=null)
DataGrid dg=(DataGrid)Ac.ActiveControl;当子窗体的DataGrid数据为空时,能转换过来,当子窗体的DataGrid数据不为空时提示不是有效转换,程序运行错;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货