Gridview不显示记录 [英] Gridview not displaying records

查看:57
本文介绍了Gridview不显示记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了临时表并通过存储过程直接调用它并在页面加载时绑定它,但我得到的错误,如在所选数据源上找不到日期。



我尝试过:



if(dt.Rows.Count> 0)

{

gridview.datasource = dt;

gridview.databind();

}

else



{

gridview.datasource = dt;

gridview.databind();



}



检查行是否返回任何内容

I created temp table and directly calling that through stored procedure and binding it on page load, but i m getting error like ,Date not found on selected data source.

What I have tried:

if (dt.Rows.Count > 0)
{
gridview.datasource = dt;
gridview.databind();
}
else

{
gridview.datasource = dt;
gridview.databind();

}

checking rows whether it returns anything or not

推荐答案

Select @DaysCount= count(distinct([Transdate]))







put bracet在trandate上试一试




put bracet on trandate and try it


这篇关于Gridview不显示记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆