This is a migrated thread and some comments may be shown as answers.

Grid CurrentPageIndex Problem

1 Answer 46 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Velkumar
Top achievements
Rank 2
Velkumar asked on 18 Nov 2011, 06:22 AM

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

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 18 Nov 2011, 06:30 AM
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.
Tags
Grid
Asked by
Velkumar
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 2
Share this question
or