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

Getting all items binded to Radgrid view

2 Answers 54 Views
Grid
This is a migrated thread and some comments may be shown as answers.
xis xix
Top achievements
Rank 1
xis xix asked on 10 Feb 2012, 12:11 AM
Hi.
I had a gridview  with paging and because of this, if i do a foreach for grid items i only get the current page items.
As far i know i could set the allow paging to false, rebind it , and gett all items this way, using a foreach (for example)
Since my work at the moment is upgrading some one else work, i would try to avoid this aproach, since that  causes me issues on rebind data source on gridview. due to programing logic already implemented. 
Is there any way to get All items from datasource, who where primarily bind to grid besides my aproach? 

my current aproach: 
...
   this.RadGrid1.AllowPaging = false;
            this.RadGrid1.Rebind();
...

2 Answers, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 10 Feb 2012, 10:26 AM
Hi there,

Unfortunately, this is the only approach. The other option is to turn to the underlying data source and get the items count from there.
 
Greetings,
Tsvetoslav
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
xis xix
Top achievements
Rank 1
answered on 10 Feb 2012, 10:44 AM
damn it 
On futures releases this would something to add. 
 
JMachacaz
Tags
Grid
Asked by
xis xix
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
xis xix
Top achievements
Rank 1
Share this question
or