Auto generated columns content

Auto generated columns content

mariooomariooo Posts: 15Questions: 4Answers: 0

Hi,

I have a problem with auto generated columns content.

In my example I have always 3 columns: guid, businessUnits and node_name.
Other columns content should be auto generated and they source is not in the ajax data source object.

View code:

    <thead>
        <tr>
            <th hidden></th>
            <th hidden></th>
            <th style="width: 400px;">Node name</th>
            @{//each bussiness unit column header
                foreach (var bu in Model.BusinessUnits)
                {
                    <th class="bu-column"><input hidden class="bu_Id" value="@bu.BusinessUnit_ID" />@bu.Code</th>
                }
            }
        </tr>
    </thead>
        columnDefs:[
            { data: "guid", targets: 0 },
            { data: "businessUnits", targets: 1, render: render.businessunits },
            { data: "node_name", targets: 2 },
            { "targets": '_all', "data": null, defaultContent: "<input type ="checkbox" />" }
        ]

I get the Cannot read property 'length' of undefined error.
Do you have any ideas why?

Regards,
Mariusz

Answers

This discussion has been closed.