Grid CurrentPageIndex Problem

2 posts, 0 answers
  1. Velkumar
    Velkumar avatar
    85 posts
    Member since:
    Apr 2011

    Posted 18 Nov 2011 Link to this post


    Grid's CurrentPageIndex  and PageSize  properties are not working .I have tried the following two mwthods

    Method 1:

                 oGrid.CurrentPageIndex = 1;
                 oGrid.PageSize = 10;
                 oGrid.Rebind();

    Method 2:
                oGrid.MasterTableView.CurrentPageIndex = 1;
                oGrid.MasterTableView.PageSize = 10;
                oGrid.MasterTableView.Rebind();

    please give me any solution

    Thanks,
    Velkumar
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 18 Nov 2011 Link to this post

    Hello Velkumar,

    Here is the sample code that I tried in PreRender event which worked as expected.
    C#:
    protected void RadGrid1_PreRender(object sender, EventArgs e)
    {
        RadGrid1.PageSize = 10;
        RadGrid1.CurrentPageIndex = 1;
        RadGrid1.MasterTableView.Rebind();
    }

    -Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top