Sunday, November 8, 2015

Kendo Grid display hyperlink field

Hi All,

Many of us struck with displaying Hyper Link Columns in Kendo Grid. Here is the solution,

There are two ways you can do this,
  1. Using Template Function of kendo grid 
  2. Using Client Template Function of kendo grid

You can use template function when there is no requirement for sorting of that column in your kendo grid.

So I always suggest Client template of kendo grid.

 Use the following way to do this,

                .ClientTemplate("<a href=\"javascript:yourJSfunctions('#= DataFiled#');\"> #= columnDataFiled# </a>");

Example:

.ClientTemplate("<a href=\"javascript:GetEmployeeDetails('#= EmployeeID#');\"> #= EmployeeID# </a>");

Note:

Here I am giving kendo grid Data field with preceding its object name. 

No comments:

Post a Comment