json - Displaying dynamic images in kendo grid -


i want populate dynamic images in kendo grid. getting json data.

and have following code

 var grid = $("#timesegmentgrid").kendogrid({     //var icon='';           datasource: {             transport: {                 read: function (options) {                     gettimesegmentlist("", onsuccess, null);                     function onsuccess(responsedata) {                         if (responsedata.segments != null)                             options.success(responsedata.segments);                         else                             options.success([]);                     }                 }             },             pagesize: 5         },         pageable: {             input: true,             numeric: false,             pagesizes: false,             refresh: true         },         toolbar: kendo.template($("#template").html()),         columns: [             { field: "display_name", title: "&{'name'}" },             { field: "display_order", title: "&{'display order'}" },             { field: "icon",                 title: "icon"             }         ]     }).data("kendogrid"); 

"icon" contains path image. now, able print path dont know how display image according path. highly appreciated.

can try:

columns : [     {          field: "icon",         title: "icon",         template: '<img src="#= icon #" alt="image" />'     } ] 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -