0
我有以下数据表定义:在数据表列显示的图像
$("#tblSteps").dataTable({
sAjaxSource: '@Url.Action("GetAllOpenCandidateSteps")?' + "candidateId=" + $("#txtCandidateId").val(),
bJQueryUI: true,
dom: 'T<"clear">rti',
bAutoWidth: false,
"bPaginate" : false,
"oLanguage": {
sEmptyTable: "There are no Steps at this time"
},
"aoColumns": [
{ "sWidth": "1%", sClass: "smallFonts" },
{ "sWidth": "1%", sClass: "smallFonts" },
{ "sWidth": "5%", sClass: "smallFonts" },
{ "sWidth": "19%", sClass: "smallFonts" },
{ "sWidth": "19%", sClass: "smallFonts" },
{ "sWidth": "19%", sClass: "smallFonts" },
{ "sWidth": "19%", sClass: "smallFonts" },
{
"sWidth": "19%", sClass: "smallFonts", "sName": "CandidateId", "mRender": function (data, type, row) {
var chk = row[7] == 'True' ? ' checked="true" ' : ' ';
var chk1;
if (chk === ' ')
chk1 = "false";
else
chk1 = "true";
if (chk1 == "true") {
return "<img height='16' width='16' src='/Images/yes.gif'></img><label style='font-size:x-small'>Complete</label>";
}
else {
return "<img height='16' width='16' src='/Images/button_red.png'></img><label style='font-size:x-small'>Not Complete</label>";
}
//return "<input type='checkbox'" + chk + " id='chkuar" + row[0] + "' onchange=approved('" + row[0] + "','" + row[1] + "'," + chk1 + "); >";
}
}
],
tableTools: {
"sSwfPath": "../../Scripts/swf/copy_csv_xls_pdf.swf", //'<c:url value="../../scripts/swf/copy_csv_xls_pdf.swf"/>', //"//cdn.datatables.net/tabletools/2.2.2/swf/copy_csv_xls_pdf.swf", //
"aButtons": [
{
"sExtends": "print",
"bShowAll": true
}
]
}
});
你会在最后一栏看到我在图片文件夹中显示图像。这显示在我的DEV盒子上使用Casinni,但不在服务器上。任何想法我做错了什么?
可能看起来很明显,但在服务器上肯定是图像? – markpsmith
@markpsmith - 是的,我可以在Images文件夹中看到它们。 –
你能看到为图像渲染的HTML吗?路径错了吗? – markpsmith