Gridview不显示记录 [英] Gridview not displaying records
问题描述
我创建了临时表并通过存储过程直接调用它并在页面加载时绑定它,但我得到的错误,如在所选数据源上找不到日期。
我尝试过:
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屋!