下面是代码:
<form method="post" runat="server" >
<ASP:DataGrid id="MyDataGrid" runat="server"
AllowPaging="True"
PageSize="5"
PagerStyle-HorizontalAlign="Right"
BorderColor="black"
BorderWidth="1"
GridLines="Both"
CellPadding="3"
CellSpacing="0"
Font-Name="Verdana"
Font-Size="8pt"
HeaderStyle-BackColor="#aaaadd"
AlternatingItemStyle-BackColor="#eeeeee"
showheader="true"
AutoGenerateColumns="true"
PagerStyle-Mode="NumericPages"
/>
</form>数字显示页数,一共两页,点击2时无法跳转.请问为什么?
<form method="post" runat="server" >
<ASP:DataGrid id="MyDataGrid" runat="server"
AllowPaging="True"
PageSize="5"
PagerStyle-HorizontalAlign="Right"
BorderColor="black"
BorderWidth="1"
GridLines="Both"
CellPadding="3"
CellSpacing="0"
Font-Name="Verdana"
Font-Size="8pt"
HeaderStyle-BackColor="#aaaadd"
AlternatingItemStyle-BackColor="#eeeeee"
showheader="true"
AutoGenerateColumns="true"
PagerStyle-Mode="NumericPages"
/>
</form>数字显示页数,一共两页,点击2时无法跳转.请问为什么?
解决方案 »
- 在编辑状态下,如何设定 dropdownlist 中的默认选定值为数据库对应值
- asp.net怎麽读取sqlserver2000 text类型的字段
- 做小中型的网站,大家谈谈用了什么算法?
- ie7 显示不出Masterpage中的控件,都挤在一起……大家碰到过吗?
- 服务器端的事件的变化如何及时通知到打开的浏览器网页?
- 救命,给主从报表附上dataset 时,不起作用,请垂青。
- Button 的onclick事件?
- 请问:OWC中的柱状图能否实现按照值的范围显示不同的颜色?
- asp.net连接oracle数据库:提示“无法加载oci.dll”!
- asp.net中一个很奇怪的问题,来者有分
- asp.net中文件上传的问题
- 在WEB页面中调用启动另一个应用程序
在该DataGrid中设置AllowPaging="true";
在PageIndexChanged事件中写:
DataGrid1.CurrentPageIndex = e.NewPageIndex;
BindData();//重新绑定数据
if(!IsPostBack)
{}中