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

Double Click RadGrid Row capture field value

2 Answers 96 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Monsi Lache
Top achievements
Rank 1
Monsi Lache asked on 13 May 2010, 09:06 AM
Hi there,

I have a radgrid with cell values including the id of a record. I want when I double click on the row in the grid to capture the value representing the id of the record. How can I achieve this.

eg

ID|NAME|ADDRESS
-----------------------------------------------
5|JOHN|56 SMITH ST
7|MIKE|87 MOLLY ST
8|ALEX|11 TEMS ST

I want when I double-click on the grid's first row, to capture id 5 on the serverside.

Once I capture this id 5, I will pass it in a query to the database to get the full details of the record and display the it on a separate tab in my application.

Please help!

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 13 May 2010, 09:37 AM
Hello Monsi,

I saw a KB article which describes on how to perform postback from grid client events. You can use the same logic by attaching 'OnRowDblClick' event to radgrid and explicitly invoke postback. And instead of index get the datakeyvalue in the client event handler and pass to server event.

The documentation will help you in Extracting key values client-side

Thanks,
Princy.
0
Monsi Lache
Top achievements
Rank 1
answered on 14 May 2010, 08:04 AM
Hi Princy,

Thanks for your help. I used the Telerik's RadControls Prometheus version of the sample code in the link above and it worked like a chum!!

Appreciated!!

Monsi.
Tags
Grid
Asked by
Monsi Lache
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Monsi Lache
Top achievements
Rank 1
Share this question
or