开发者

PagedDataSource Count

i am using pageddatasource to make paging for datalist control, but when binding pageddatasource to linq query, the count doesn't change although the result of query is different (ResultQuery_Count = 13 AND PagedDataSource count always 10). and IsFirstPage and IsLastPage always true as well

here's the Code :

PagedDataSource objPage = new PagedDataSou开发者_Python百科rce();
try
{
    objPage.AllowCustomPaging = true;
    objPage.AllowPaging = true;
    objPage.DataSource = Getter.GET_GeneralResult();
    objPage.PageSize = 8;
    objPage.CurrentPageIndex = CurrentPage;
    lbtnNext.Enabled = !objPage.IsLastPage;
    lbtnPrev.Enabled = !objPage.IsFirstPage;   
    DataList1.DataSource = objPage;
    DataList1.DataBind();
}
catch (Exception ex)
{
    throw ex;
}


When the query is updated, did you rebind the datalist?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜