问题描述
嗨...
当我单击一个按钮时,我将显示gridview ...现在我想设置页面调度属性,我已经设置了允许页面调度和其他属性..这是可行的,但是现在问题出在切换到下一页时,网格视图是不刷新,如果我再次单击该按钮,则Gridview正在运行..
谁能告诉我解决方案?
[edit]仅主题:尝试给出问题的简要摘要,而不是主题中的整个问题-OriginalGriff [/edit]
hi ...
when i click a button , i will show gridview...now i want to set the paging properties ,i had set allow paging and other properties.. that is working but now the problem is while changing to the next page, grid view is not refreshing and if i click again the button , the gridview is working..
can anyone tell me the solutions?
[edit]Subject only: try to give a concise summary of your problem, rather than the whole question in the subject - OriginalGriff[/edit]
推荐答案
protected void gvCustomers_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
gvCustomers.PageIndex = e.NewPageIndex;
GridBind();//method to bind the gridview
}
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridView1.PageIndex = e.NewPageIndex;
}
并请添加您有问题的代码以获得更好的帮助.
And please add your code in question for better help.
这篇关于带有下一页按钮的Gridview分页问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!