datagrid分页问题
程序代码:
<asp:DataGrid ID="mydataGrid" runat="server" AllowCustomPaging="True" AllowPaging="True" CellPadding="2" DataKeyField="id" GridLines="None"OnDeleteCommand="mydataGrid_delete" AutoGenerateColumns="false" PagerStyle-HorizontalAlign="Right" PagerStyle-Mode="NextPrev" Height="464px" Width="688px" OnPageIndexChanged="mydataGrid_PageIndexChanged"/> <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Right" NextPageText="下一页" PrevPageText="上一页" PageButtonCount="20" /> <Columns> <asp:BoundColumn DataField="标题" ReadOnly="True" HeaderText="标题" /> <asp:HyperLinkColumn HeaderText="修改" Text="编辑"DataNavigateUrlField="id" DataNavigateUrlFormatString="weihu.aspx"/> <asp:ButtonColumn CommandName="delete" Text="删除" HeaderText="删除" /> </Columns> </asp:DataGrid> Protected Sub mydataGrid_PageIndexChanged(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridPageChangedEventArgs) mydataGrid.CurrentPageIndex = e.NewPageIndex bindgrid() End Sub
代码就是上面的了,都是抄的,可是我最终的结果,上一页和下一页都不管用,鼠标放上面和放在普通文本上一样
[[it] 本帖最后由 wangtuan7788 于 2008-8-14 14:30 编辑 [/it]]