I want to display an icon in the kendo grid at the last with click event functionality ,Kindly provide me a sample .Please find the attached screen shot how it should be.
For your convenience I am attaching a small sample which demonstrates the above approach.
Regards,
Georgi
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers.Learn More.
Thanks for your solution,I need this kind of solution only, however I need row details as well in the same function to pass to pop screen when click on myHandler()
Could you please help out in this case
Kind Regards,
Lakshman.
0
Georgi
Telerik team
answered on 19 May 2020, 01:42 PM
Hello Lakshman,
You could get the underlying model of the current row using the grid.dataItem method.
e.g.
// column
columns.Template(@<text></text>).ClientTemplate(" <span class='k-icon k-i-information' onclick='myHandler(event)'></span>");
// handler
function myHandler(e) {
var grid = $('#grid').data('kendoGrid');
var dataItem = grid.dataItem($(e.target).parents('tr')); // underlying model
}
Regards,
Georgi
Progress Telerik
Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic. Our thoughts here at Progress are with those affected by the outbreak.