比如,我在页面加载时这样
if (this.DataGrid1.CurrentPageIndex>this.DataGrid1.PageCount)
{
this.DataGrid1.CurrentPageIndex=0;
}
还是一样,请各位帮帮忙,我都搞了一下午了,但还是没搞好!
if (this.DataGrid1.CurrentPageIndex>this.DataGrid1.PageCount)
{
this.DataGrid1.CurrentPageIndex=0;
}
还是一样,请各位帮帮忙,我都搞了一下午了,但还是没搞好!
解决方案 »
- 怎么实现插入数据后就弹出添加成功?
- DetailsView在符合某些条件后才能使用编辑、更新操作,这怎么做?麻烦大家了!
- 子窗体获取父窗体的控件内容
- ORACLE连接字符串
- 怎么实现数据库中的内容定期更新!!
- XML文件在WINXP系统下能显示。为什么在WIN2000与WINME下不能显示呢?最后10分
- 超难问题。。。。表格移动与模版列问题
- 2个小问题 解决立即给分 大家帮帮忙
- 为什么Session_End和Application_End都不能执行 (在线等)
- 页面如何无刷新传值?
- 请所有客户端高手来看!!!
- <meta http-equiv="refresh" content="10"> 怎么样在vs.net输入了。
(this.DataGrid1.CurrentPageIndex<0
{
this.DataGrid1.CurrentPageIndex=0;
}
(this.DataGrid1.CurrentPageIndex<0)
{
this.DataGrid1.CurrentPageIndex=0;
}
不过你也可以不判断
直接this.DataGrid1.CurrentPageIndex = 0;