Inline Editor Styling
Inline Editor Styling
Currently my inline editor with a submit button looks like this...http://i.imgur.com/3KdJf3b.png
I would like it to look like the inline editor button sample
The only difference between my code and the sample is the table and the fact i am using as an "Select" dropdown.
Should the editor expand to fit the control or is this done by the table definition?
No matter what width i specify in the table the select box expands to fill the button is always on the line below.
Can you point me in the right direction
Thanks
editor = new $.fn.dataTable.Editor({
ajax: function (method, url, data, success, error) {
UpdateRecord(data, success, error);
},
table: "#example",
idSrc: "id",
fields: [{
//label: "Choose the new status:",
name: "fort_auditstatus",
type: "select",
options: [
// hard coded values until i work out how to dynamically gen
{ label: "Awaiting review", value: "453670005" },
{ label: "Accept", value: "453670004" },
{ label: "Further Information", value: "453670002" },
{ label: "Refer", value: "453670003" },
{ label: "Reject", value: "453670001" },
]
}]
});
$('#example').on('click', 'td.editor-control', function (e) {
editor.inline(this, {
buttons: {
label: '>',
fn: function () {
this.submit();
}
}
});
Replies
Found the issue - the datatables.editor.css file was not being loaded correctly
Good to hear you found the issue! Thanks for posting back.
Allan