On render for name column there is hyperlink and for boolean column there is check box.
hyperlink code for column render
if (ui.column.dataIndx === "Name") {
var encodeUriComponent = encodeURIComponent(result);
return "<a style='text-decoration:underline;' href=/abc/xyz?Id=" + $('#ddlFoo').val() + "&Name=" + encodeUriComponent + " target='_blank'>" +
result +
"</a>";
} else {
return result;
}
checkbox render:
-------------------------------------------
var cb = ui.column.cb,
cellData = ui.cellData,
checked = cb.check === cellData ? 'checked' : '',
disabled = this.isEditableCell(ui) ? "" : "disabled",
text = cb.check === cellData ? 'TRUE' : (cb.uncheck === cellData ? 'FALSE' : '<i>unknown</i>');
return {
text: "<label><input type='checkbox' " + checked + " />" + text + "</label>",
style: (disabled ? "background:lightgray" : "")
};
On export to excel, the boolean columns has this, same is case for hyperlink column, it shows html.
IsDeleted
<label><input type='checkbox' />FALSE</label>
<label><input type='checkbox' />FALSE</label>
<label><input type='checkbox' />FALSE</label>
<label><input type='checkbox' />FALSE</label>
<label><input type='checkbox' />FALSE</label>
Ideally I don't want to remove all this formatting in beforeExport event for multiple columns. I am not sure how I do that also. Code is going to be messy.
Any suggestions ?
if column is of type checkbox, why does not it get rendered as checkbox, why in render do I need to create checkbox input ?