When my code is :
$(document).ready(function () {
var objectData =
$.ajax({
async: false,
type: “POST”,
url: “UpdateConsignmentDetails/GetCategoryAttributeList”,
contentType: “application/json; charset=utf-8”,
dataType: “json”,
success: function (hiddenData ) {
var hot = new Handsontable($('#example')[0], {
data: hiddenData,
colHeaders: true,
colHeaders: ['TNT Date Received', 'Trip ID', 'Name', 'Address1', 'Town', 'Invoice Number', 'PO Number', 'Rec Pallets', 'Units', 'Rec Units',
'Total Sets', 'Carton Units', 'Rec Cartons', 'Inbound Con', 'Warehouse Location', 'TNT Despatch Date', 'TNT Cons Number',
'Bookin Requested', 'Bookin Date', 'Bookin Ref', 'Label Printed', 'Hold Status', 'Order Number']
});
}
}).fail(function () {
console.log('Request failed, inspect arguments for details')
});
});
it works a treat. If I add columns: , all the data disappears. What am I doing wrong?
$(document).ready(function () {
var objectData =
$.ajax({
async: false,
type: “POST”,
url: “UpdateConsignmentDetails/GetCategoryAttributeList”,
contentType: “application/json; charset=utf-8”,
dataType: “json”,
success: function (hiddenData ) {
var hot = new Handsontable($('#example')[0], {
data: hiddenData,
colHeaders: true,
colHeaders: ['TNT Date Received', 'Trip ID', 'Name', 'Address1', 'Town', 'Invoice Number', 'PO Number', 'Rec Pallets', 'Units', 'Rec Units',
'Total Sets', 'Carton Units', 'Rec Cartons', 'Inbound Con', 'Warehouse Location', 'TNT Despatch Date', 'TNT Cons Number',
'Bookin Requested', 'Bookin Date', 'Bookin Ref', 'Label Printed', 'Hold Status', 'Order Number'],
columns: [
{},
{ readOnly: true },
{ readOnly: true },
{ readOnly: true },
{ readOnly: true },
{ readOnly: true },
{ readOnly: true },
{ readOnly: true },
{ readOnly: true },
{ readOnly: true },
{ readOnly: true },
{ readOnly: true },
{ readOnly: true },
{ readOnly: true },
{},
{},
{},
{},
{},
{},
{},
{},
{ readOnly: true }
],