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

Radgrid Column values

5 Answers 117 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Prince
Top achievements
Rank 1
Prince asked on 03 Aug 2011, 05:02 PM
Hi I want to store all the column values in all pages of radgrid in to list. I am storing Column Ids in the list...If the user sorts the radgrid by name...I have to store the column ids in the list in same sorting order

I am using itemdatabound .but it is storing the values in current page...but i need all the column values in all pages of radgrid...

Help is appreciated..
Thanks

5 Answers, 1 is accepted

Sort by
0
Elliott
Top achievements
Rank 2
answered on 03 Aug 2011, 05:40 PM
I would cache the DataSource in the NeedDataSource event handler along with the current filter
0
Prince
Top achievements
Rank 1
answered on 03 Aug 2011, 05:47 PM
I did that...used session for that...it is working fine...but when i sort the datagrid by name..it is not storing the column ids in same order as it appear in grid...i used onitemdatabound to preserve the list sort order, but its not saving all the columns in every page...I enabled paging for the radgrid
0
Elliott
Top achievements
Rank 2
answered on 03 Aug 2011, 06:00 PM
I'd also cache the collection of GridSortExpressions - and then apply them to the cached datasource object prior to using it

I realize you need the current sort but not the current filter, right?
0
Prince
Top achievements
Rank 1
answered on 03 Aug 2011, 06:36 PM
Yes i need current sort
0
Elliott
Top achievements
Rank 2
answered on 03 Aug 2011, 06:50 PM
For Each x As GridSortExpression In rgStores.MasterTableView.SortExpressions
   x.ToString --> ColumnName ASC (or DESC)
Next

if you cache grid.MasterTableView.SortExpressions (the collection of sort expressions)
then you can iterate through them as above, building a sort expression, then using DataView to apply it to the DataSource
Tags
Grid
Asked by
Prince
Top achievements
Rank 1
Answers by
Elliott
Top achievements
Rank 2
Prince
Top achievements
Rank 1
Share this question
or