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

Retrieve sorted and filtered datas

5 Answers 85 Views
Grid
This is a migrated thread and some comments may be shown as answers.
theaidan
Top achievements
Rank 1
theaidan asked on 26 Apr 2010, 09:27 AM
Hi,

How can i retrieve data from the radgrid in a datatable-like object ?

like export to excel, keeping order and filter.
The final goal : i would like get all datas from the radgrid and set the datasource of a RadChart with it.

MasterTableView.DataSource is the original datasource (with no filter or sort), and iterate the items, only iterate the current page (RadGrid do not cache data, only keep current page...)

my dream is something like that :
myRadChart.DataSource = myRadGrid.MasterTableView.SortedAndFilteredDataSource;

any help will be appreciated :)

5 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 26 Apr 2010, 12:23 PM
Hi,

Please refer the following forum link which explains the similar scenario .
DataGrid to DataTable

Regards
Shinu.
0
theaidan
Top achievements
Rank 1
answered on 26 Apr 2010, 01:58 PM
Hi Shinu,

thanks for your quick answer.
I forgot something juste essential in my original post, sorry... my RadGrid has pagination activated.
So the "foreach" statement seems iterate only into currently displayed items. :(
I search always how to iterate all filtered and sorted data like an excel export with "ignore Paging".
RadFilter + Radgrid is really awesome... just missing a method to retreive simply data like an export to ICollection for example :)

Regards,
theaidan.
0
theaidan
Top achievements
Rank 1
answered on 29 Apr 2010, 10:07 AM
no body has ideas ?
0
Accepted
Pavlina
Telerik team
answered on 30 Apr 2010, 02:48 PM
Hi Theaidan,

The RadGrid control keeps only the current page of data when paging is enabled. It never requests or processes any other data than the current page. You have access to whatever data RadGrid is bound only. This is why, with paging, you cannot get data in other pages.

If you need to use the data in all pages, you could temporarily disable paging(set AllowPaging="false"), iterate over all your data items and then re-enable paging again.

Kind regards,
Pavlina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
theaidan
Top achievements
Rank 1
answered on 10 May 2010, 01:44 PM
Hi Pavlin,
thanks for your answer.
i will work on this way.

i will try do write an helper to work with radchart+radgrid+radfilter.

the final goal is for me : to display filtered grid and chart likes in google analitycs.The same datasource, the same filter, the same order... and no paging for graph :)

anyway, telerik components are the best I ever used for asp.net :)

Tags
Grid
Asked by
theaidan
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
theaidan
Top achievements
Rank 1
Pavlina
Telerik team
Share this question
or