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

How to get all the rows count in rad grid

2 Answers 216 Views
Grid
This is a migrated thread and some comments may be shown as answers.
prasad
Top achievements
Rank 2
prasad asked on 04 Feb 2010, 02:15 PM
Hi,
I am using rad grid
and i am having one doubt

and below is my code:
 
foreach (GridDataItem item in rgShowAvailable.MasterTableView.Items)
{str += item[
"TagNumber"].Text + ",";} 

in the above code if paging is there i am able to get only the first page index items and in the page index 2 i am not able to add to the database.

So i need help under the above scenario that to get the all items even if the paging is there?
 
if i give
How to get all the items for the above code

Thanks in advance
Vara Prasad.M

2 Answers, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 05 Feb 2010, 06:34 AM
Hi prasad,

There are two ways to get all the rows to which you are binding the grid:

- the first one is to turn directly to the database and retrieve them through data access operations.

- the second is to set AllowPaging=false for the MasterTableView of the grid, rebind (Rebind()) the grid, retrieve the Items collection, set AllowPaging back to true and again rebind the grid.

I hope this helps.

Best wishes,
Tsvetoslav
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
Princy
Top achievements
Rank 2
answered on 23 Apr 2010, 06:23 AM

Tags
Grid
Asked by
prasad
Top achievements
Rank 2
Answers by
Tsvetoslav
Telerik team
Princy
Top achievements
Rank 2
Share this question
or