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

Use Grid as DataSource

1 Answer 45 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ralph
Top achievements
Rank 1
Ralph asked on 28 Jan 2014, 05:31 PM
Is it possible to use a 'Filtered' Telerik Grid as a datasource for a report.?
I have a grid that has numerous columns that can be filtered on. Once a use is done applying their filters, I want to pass the results to a report. Not just export the grid. I can design the Report using the same sproc that the grid uses so in theory I would be applying the filter inside the sproc and the report would be none the wiser, all the columns would be the same. So if I design the report initially using a SQLDataSource can I swap it out at run time with the results of the filtered grid?It would not be feasible to create report parameters for all the fields that can be filtered in the grid, I just want to leverage what the grid can already do.

1 Answer, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 31 Jan 2014, 03:30 PM
Hello Ralph,

A possible approach to get the filtered data in the RadGrid to be used in the generation of a report is to convert the RadGrid data into a DataTable and then, using an ObjectDataSource component, set this DataTable as the report's data source. Sample code for this approach can be found in the following forum thread: radgrid to datatable.

Regards,
Nasko
Telerik

New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.

Tags
General Discussions
Asked by
Ralph
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Share this question
or