Product Bundles
DevCraft
All Telerik .NET and Kendo UI JavaScript components and AI Tools in one package.
Kendo UI
Bundle of AI Tools plus four JavaScript UI libraries built natively for jQuery, Angular, React and Vue.
Build JavaScript UI
Javascript
Telerik
Build modern .NET business apps
.Net Web
Cross-Platform
Desktop
Reporting and Documents
AI for Developers & IT
Ensure AI program success
AI Coding
AI Engineering
Additional Tools
Enhance the developer and designer experience
Testing & Mocking
Debugging
UI/UX Tools
CMS
Free Tools
Support and Learning
Productivity and Design Tools
column.Bound(x => x.ReportUrl).ClientTemplate("<a href='#= ReportUrl #' target='_blank'>#= ReportUrl #</a>").Width(100);Can I use a ClientTemplate to invoke a method from my controller when I click on the record in grid?
Maybe there is some examples?
Hello Deivydas,
To access a server-side method when a specified Grid table cell is clicked, you need to trigger an AJAX request to the respective method. For example:
column.Bound(x => x.ReportUrl) .ClientTemplate("<a href='javascript:;' onclick='report(\"#= ReportUrl #\");'>#= ReportUrl #</a>"); <script> function report(reportUrl) { $.ajax({ url: reportUrl, type: "POST", success: function() { ... } }); } </script>
Let me know if this approach works for you.
Regards, Mihaela Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.