Hi All ,
Please help me ......
I have a kendo grid and i have bind it a controller function , there is a document filed(Attachment Name) in it and it is showing different document name Now i wil have to add a image on the basis of document in each row corresponding document name . and i have written a function in controller that is returning a string image path . I just want to call a function in grid column and bind it into a image URl of image control .
$.ajax({
type: "POST",
"url": '@Url.Action("TSController", "TSFunction")',
"data": data,
"dataType": this.datatype,
"contentType": "application/json; charset=utf-8",
"success": function (data) {
if (data.length > 0) {
$("<div/>").appendTo(e.detailCell).kendoGrid({
dataSource: data,
columns: [
{
title: "",width: 30,template: "<img src='../../Images/accent.png' width='10px' height='10px'/>"
},
{
field: "DocName", title: "Attachment Name"
},
{
field: "DocPrimaryId", title: "DocumentId", hidden: true
},
{
field: "TSd", title: "TSd", hidden: true
},
{
field: "AttachmentType", title: "Attachment Type"
},
{
command: { text: "Re-Link Attachment",
click: RelinkAttachment,
title: "Action",
width: "140px"
}
},
{
command: { text: "Download",
click: DownloadAttachment,
title: "Action",
width: "140px"
}
},
{
command: { text: "Delete",
click: DeleteAttachment,
title: "Action",
width: "140px"
}
}
]
})
}
else {
}
},
error: function (result) {
var data = jQuery.parseJSON(result);
alert("Error :" + data);
}
});
Please help me ......
I have a kendo grid and i have bind it a controller function , there is a document filed(Attachment Name) in it and it is showing different document name Now i wil have to add a image on the basis of document in each row corresponding document name . and i have written a function in controller that is returning a string image path . I just want to call a function in grid column and bind it into a image URl of image control .
$.ajax({
type: "POST",
"url": '@Url.Action("TSController", "TSFunction")',
"data": data,
"dataType": this.datatype,
"contentType": "application/json; charset=utf-8",
"success": function (data) {
if (data.length > 0) {
$("<div/>").appendTo(e.detailCell).kendoGrid({
dataSource: data,
columns: [
{
title: "",width: 30,template: "<img src='../../Images/accent.png' width='10px' height='10px'/>"
},
{
field: "DocName", title: "Attachment Name"
},
{
field: "DocPrimaryId", title: "DocumentId", hidden: true
},
{
field: "TSd", title: "TSd", hidden: true
},
{
field: "AttachmentType", title: "Attachment Type"
},
{
command: { text: "Re-Link Attachment",
click: RelinkAttachment,
title: "Action",
width: "140px"
}
},
{
command: { text: "Download",
click: DownloadAttachment,
title: "Action",
width: "140px"
}
},
{
command: { text: "Delete",
click: DeleteAttachment,
title: "Action",
width: "140px"
}
}
]
})
}
else {
}
},
error: function (result) {
var data = jQuery.parseJSON(result);
alert("Error :" + data);
}
});