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

RadGrid/TelerikReporting Interaction

3 Answers 87 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Carla Lewis
Top achievements
Rank 2
Carla Lewis asked on 14 Apr 2009, 07:43 PM
I'm using Asp.Net AJAX UI controls to display a RadGrid on a page with a ReportViewer underneath.  When the user selects a row in the RadGrid I want to capture the ID field from the selcted row and update the ReportViewer by passing that same ID to the newly instantiated report.

Has anyone done anything like this?

I can capture the needed ID from the client-side of the RadGrid, but I can only update the ReportViewer on the server-side.  I guess if I knew how to capture the RadGrid selected row on the server-side I could manage just fine.

3 Answers, 1 is accepted

Sort by
0
Chris Gillies
Top achievements
Rank 1
answered on 15 Apr 2009, 12:16 PM
I'm no grid expert, but I've gotta admit that this product's documentation is great. Here is what I've found after a quick search in it:

http://www.telerik.com/help/aspnet-ajax/grdretrieveprimarykeyfieldvaluesforitems.html

Basically you can use the SelectedIndexChanged server event for getting the selected row and then pass it to the ReportViewer or any control that would work with it.

Cheers



0
Carla Lewis
Top achievements
Rank 2
answered on 15 Apr 2009, 12:51 PM
I would think so too, but I cannot get the event to fire with using the client-side row select.  I don't want to use a column button to select the row, I'd like the user to be able to select and highlight the row which happens to be a client-side function.

Thanks for the suggestion though.
0
Carla Lewis
Top achievements
Rank 2
answered on 15 Apr 2009, 02:27 PM
Got it!  In the RadGrid I needed to set EnablePostBackOnRowClick to true.  Now my client-side row selection fires a postback/ajax request and then I can set the ReportViewer.
Tags
General Discussions
Asked by
Carla Lewis
Top achievements
Rank 2
Answers by
Chris Gillies
Top achievements
Rank 1
Carla Lewis
Top achievements
Rank 2
Share this question
or