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

Access entire data item in client javascript

1 Answer 16 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 28 Mar 2014, 05:28 PM
I have a ajax bound grid with the following client template:

ClientTemplate("<img onclick='grdCreateClick(#=TransactionID#,#=FormID#,#=UserID#,#=DetailID#);' />")

Is there a way to pass the entire data item row instead of passing each field like:

ClientTemplate("<img onclick='grdCreateClick(data);' />")

any help is appreciated.

Thanks...

1 Answer, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 31 Mar 2014, 06:25 AM
Hello Michael,

The click handler should look like the following:
<img onclick='grdCreateClick(#:JSON.stringify(data)#)' />


Regards,
Nikolay Rusev
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
Tags
Grid
Asked by
Michael
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Share this question
or