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

RadGrid Export

6 Answers 109 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Vme
Top achievements
Rank 1
Vme asked on 03 Jun 2009, 02:18 PM
After binding a Radgrid to a datasource and doing filtering/grouping/etc... is there a way to get the modified Datasource only?  For example if I bind to a datasource with 100 rows, then i filter it down to 5 rows.  I want to get just the 5 row in my new data object?  Is this a possibility?

Thank you!

6 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 04 Jun 2009, 06:45 AM
Hi Kyle,

I am sending you a simple runnable application which handles the desired functionality. Give it a try and let me know if you have other questions or problems.

Kind regards,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Vme
Top achievements
Rank 1
answered on 04 Jun 2009, 11:33 AM
Thank you for your reply, but this is not quite what I was after.  I'm looking to be able to access the filtered datasource in the code behind.  The ExportToExcel feature of the RadGrid only works for a small amount of data.  I have 100k+ rows that I'm wanting to export and I need to do it on the server side.  So I was hoping there was a way to access the same dataset that the ExportToExcel generates, but in the codebehind.

Sorry for the confusion.

Thank you!

0
Pavlina
Telerik team
answered on 04 Jun 2009, 05:11 PM
Hello Kyle,

I am not sure if I understand your scenario completely. Would you please elaborate a bit more on the details.
I will be best if you open a formal support ticket and send us a simple runnable application. Thus I could do all my best to find a quick solution/fix of this matter.

Best wishes,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Vme
Top achievements
Rank 1
answered on 04 Jun 2009, 06:29 PM
I'm wanting to take a datasource and get the filtered results.  So for example..

RadGrid1.Datasource = data;
RadGrid1.Databind();

now after the user on the GUI filters and sorts, groups, etc....there is a new set of results displaying that if you do ExportToExcel() it will only show you the filtered results exactly how they are in the RadGrid.  I want to access the exact data that is output in the ExportToExcel, but in the codebehind.  So if you started with 100 records and you filtered it down to 50 showing in the grid.  I was hoping to access just the 50 that are showing somehow in codebehind.

Thanks again.
0
Pavlina
Telerik team
answered on 05 Jun 2009, 01:24 PM
Hi Vme,

I am afraid that the desired functionality could be hardly achieved with RadGrid control. To get the filtered results I suggest that you take the data from the proper DataSource and filter the dataset using the Filter Expression of RadGrid for select method.

Find more information in the following article:
Operating with the FilterExpression of Telerik RadGrid manually

All the best,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Joe
Top achievements
Rank 1
answered on 27 Jul 2010, 09:50 PM
VME,  I have the same requirements and looking for the same solution.  Did you ever figure out how to address the problem of programmatically access the radgrid's filtered results in the code behind, thus allowing export of large data sets?
Tags
Grid
Asked by
Vme
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Vme
Top achievements
Rank 1
Joe
Top achievements
Rank 1
Share this question
or