如何划分gridview的行以允许查看8行并使寻呼机能够查看下一行? [英] How do I divide the rows of gridview to allow to see 8 rows and enable pager to see next rows?
本文介绍了如何划分gridview的行以允许查看8行并使寻呼机能够查看下一行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用gridview,我绑定了一个数据列..这是网格的aspx代码..
I am using a gridview where i am binding a data column.. this is the aspx code of grid..
<asp:GridView ID="GridViewJobList" runat="server" AutoGenerateColumns="false" CssClass="gridTable"
EmptyDataText="No Record Found" DataKeyNames="Entry_No" OnRowDataBound="GridViewJobList_RowDataBound"
Width="100%" GridLines="None" AllowPaging="True" PageSize="8">
我有11条记录..根据代码,最多显示8条记录并显示寻呼机,但当我点击2查看从第9行开始的下一条记录时,点击显示无效果显示前8条记录...是否我缺少添加一些属性???
任何帮助??
I have 11 records .. According to the code, maximum of 8 records are displayed and pager appears but when i click on 2 to see next records starting from 9th row, click shows no effect and first 8 records are displayed... Is it that i am missing to add some properties???
any help??
推荐答案
你应该处理gridview_pageindexchanging
事件
you should handlegridview_pageindexchanging
event
protected void yourgrid_pageindexchanging(object sender,GridViewPageEventArgs e)
{
yourgrid.PageIndex = e.NewPageIndex;
bindgrid();
}
在 Tun Aung Paing 解决方案1之上(完美无瑕)
有看看类似的帖子,你会发现多种解决方案和建议
分页 [ ^ ]
On top of Tun Aung Paing solution1 ( works perfect )
have a look on similar post you find multiple solutions and suggestions
paging in gridview in asp.net[^]
这篇关于如何划分gridview的行以允许查看8行并使寻呼机能够查看下一行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文