可能是matterDataSet1.Tables[0].DefaultView没有记录。
最好是判断一下:
if(matterDataSet1.Tables[0].rows.count!=0)
{
this.DataGrid1.DataSource = matterDataSet1.Tables[0].DefaultView;
this.DataGrid1.DataBind();
}
else
{
this.DataGrid1.visible=false;
}
最好是判断一下:
if(matterDataSet1.Tables[0].rows.count!=0)
{
this.DataGrid1.DataSource = matterDataSet1.Tables[0].DefaultView;
this.DataGrid1.DataBind();
}
else
{
this.DataGrid1.visible=false;
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货