Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
180
Paging Issue
posted

Hi,

I am new to Infragistic webgrid.In my application i am using this grid with paging and a  page size of 10.I am binding this grid with a dataset having rows 1000.i want to do some manipulating of that data so i have to loop through all rows of the grid.but when i take a count of grid rows

for (int j = 0; j < grid.Rows.Count; j++)//This gives me only 10 rows count

{

}

Grid.Rows.Count it gives me only 10 rows not 1000.Beacause the page size is 10 and at a time only 10 rows is visible to the user.

How can i take all rows and all cell data while paging??

Regards,

Anilesh Lakhtakia

 

  • 140
    posted

    I think you will need to disable paging, rebind the grid, then loop through your data.  The re-enable and re-bind when you're finished.  Like this...

    UltraWebGrid2.DisplayLayout.Pager.AllowPaging = false;
    UltraWebGrid2.DisplayLayout.LoadOnDemand =
    LoadOnDemand.NotSet;
    UltraWebGrid2.DataBind();

    //loop through rows

    UltraWebGrid2.DisplayLayout.Pager.AllowPaging = true;
    UltraWebGrid2.DisplayLayout.LoadOnDemand =
    LoadOnDemand.Automatic;
    UltraWebGrid2.DataBind();

    I've had performance problems doing stuff like this - even with the data is cached.  But it's the only way I know to do it.

    -Walter