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

Show details in ajax panel on Row Select event

3 Answers 38 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Craig Mellon
Top achievements
Rank 1
Craig Mellon asked on 14 Dec 2011, 03:28 PM
Hello,

I have a Rad Grid to the left of my page and a ajax panel to the right, I basically want the user to be able to select any row in my grid which in turn will pass an ID and refresh the ajax panel showing the selected row details.

I'm pretty sure you used to have an online example of this scenerio, if so could please link it (I've looked everywhere for it to no avail).

Thank you.

3 Answers, 1 is accepted

Sort by
0
Accepted
Mira
Telerik team
answered on 14 Dec 2011, 06:27 PM
Hello Craig,

Please examine this demo to see how a similar scenario is implemented.

I hope this helps.

Regards,
Mira
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Craig Mellon
Top achievements
Rank 1
answered on 16 Dec 2011, 04:06 PM

Thanks for the reply.

What if I want to simplify this more and remove alot of markup that comes with your example? eg I don't need to edit details or feel the need to use RAD Window.

Say for example I have a simple RAD Grid with 2 columns, one of these columns is Name. On row select would it be as simple as I'm thinking to extract the selected rows data and display it in a label like so?

Protected Sub RadGrid1_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.ItemCommand
 
    If e.CommandName = "RowSelect" Then
 
        Dim Name As String = (e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("Name"))
 
        Label1.Text = Name.ToString
 
    End If
 
End Sub

I tried the above with no luck, any suggestions?

Many thanks.

0
Craig Mellon
Top achievements
Rank 1
answered on 16 Dec 2011, 04:32 PM
Ok fixed now using "RowClick" command name.

Thanks anyway.
Tags
Grid
Asked by
Craig Mellon
Top achievements
Rank 1
Answers by
Mira
Telerik team
Craig Mellon
Top achievements
Rank 1
Share this question
or