快疯了:DataGrid绑定的数据居然显示不出来!
原来是在vs2003下的程序后来转换成了vs2005了,这到没有什么
今天发生一个奇怪的事情:
我在给datagrid绑定数据源时候成功了(从事件探测器可以看到)
但是数据却显示不出来,哭了
绑定的函数是:
public void BindDataGrid(int intCurrentPageIndex, string strWhere)
{
Recomment recomment = new ShNews.DataAccess.Recomment();
ReDataList.DataSource= recomment.LoadRecomment(pageSize,intCurrentPageIndex,strWhere);
ReDataList.DataBind();
//
int intRecordCount=recomment.GetRecommentCount(strWhere);
//计算总页数
double dblRecordCount;
dblRecordCount = System.Convert.ToDouble(intRecordCount);
intPageCount = (Int32)Math.Ceiling(dblRecordCount / pageSize);
//统计总页树
pagelabel.Text=" 当前总共有"+"<font "+"color="+"#E10900"+">"+intPageCount+"</font>"+"页"+" "+"<font "+"color="+"#E10900"+">"+intRecordCount+"</font>"+"项"+
" 当前是第"+"<font color=#E10900>"+intCurrentPageIndex+"</font>"+"页";
this.ChooseALLErro.Text="";
}
这段像似的代码用到其他不少地方,今天却不能正确运行,太奇怪了!