Page 1 of 1

The datatable column content function is not reapplied after edit

Posted: 28 Nov 2017, 05:11
by jolewis
I have a content function defined on one of my editable columns in a DataTable. When I finish editing, the content function is not reapplied. If I sort any column after the edit the content function is reapplied. Is there a way I can call the content function? Perhaps after some kind of onEditCompleted event if it exists. Also, is there a way to customize the editor in the cell so that I can use a textarea instead of an input text box? Perhaps with some kind of editContent function? Thanks.

Code: Select all

{
    field: "Notes",
    headerText: "Release Notes",
    content: function (p) {
        var h = "";
        p.Notes.split("\n").forEach(function(note) {
            if (note) h += "<li>" + note + "</li>";
        });
        return $("<ul>" + h + "</ul>");
    },
    editor: "input",
    sortable: false
}