Access hidden column(s) for Inline Edit
Access hidden column(s) for Inline Edit
j.agnew
Posts: 1Questions: 1Answers: 0
Hi, I have two hidden columns that I need to pass to my server. I can get the actual column that I need to update, but not the hidden ones that I need to use to query my DB with so I know which ones to update.
I assume I can use the API, but cannot find an example. Thanks!
function Editor() {
PDS.Editor = new $.fn.dataTable.Editor({
ajax: "/Report/SaveAdvertisingSpend",
table: "#grid",
idSrc: 'cell.RowId',
fields: [
{
label: "",
name: "cell.AdvertisingSpendAmount" // Can see and get this value.
},
{
label: "",
name: "cell.OrderMonth" // Hidden, cannot see.
},
{
label: "",
name: "cell.OrderYear" // Hidden, cannot see.
},
]
});
}
$('#grid').on('click', 'tbody td.editable',
function() {
PDS.Editor.inline(this,
{
buttons: {
label: '>', fn: function () { this.submit(); }
}
});
});
Edited by Colin - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.
Answers
You should be able to use the
form-options
to setsubmit
to be 'allifChanged' - something like:Please let us know if that doesn't do the trick,
Colin