Table creation;
var table = $("#tbl-inventory-report").DataTable({
ajax: {
url: "/api/inventory",
dataSrc: "",
},
"oLanguage": {
"sProcessing": ""
},
processing: true,
columns: [
{
data: "Id",
className: "visible-lg",
},
{
data: "Employee.LogonName"
}
]
});
Example Json Result of Ajax Request;
{
Id:3434,
Employee:{
Id:10,
LogonName:"Example10"
}
}
JS Code that I get the error;
table.row.add({
"Id": 11,
"Employee.LogonName": "Example11",
}
Data loads successfully when page loaded. However, when I want to add rows later on, I get the following error. Any Idea?
Requested unknown parameter 'Employee.LogonName' for row 2856, column 1.
Due to the record structure defined in your inventory api, you need to change this line:
table.row.add({
"Id": 11,
"Employee.LogonName": "Example11",
}
to:
table.row.add({
"Id": 11,
"Employee": {
"LogonName": "Example11"
}
});
I have seen this tendency on some websites now, where the default cursor is replaced with a new cursor – in many cases circles
I have some javascript that I load in my headAnd I want to reference some data attributes
This has been the subject of the following similar SO Question and several github issues including:
I have a function that applies scrollTop() to the addClass() and removeClass() attributes; however, when removeClass() is prompted, the scrollTop() causes an split-second jump to the top (top: 0) of the page, then readjusts to the current window positionIs...