As seen here, and here, we can have inline editing of columns that have been hidden in the responsive UI. The issue is we can't get it to only allow editing on the editable columns only.
This example here is based on those links you created, and it's behaving as expected - only the editable fields in the responsive area are editable. Would you be able to change that example please to demonstrate your problem,
I'll try. What I am looking for is to click on the circled area of editable fields only. Let's say Defective Qty was not editable. The issue is in the ul, the fields do not have editable class.
Notice how the child row does not contain editable class anywhere.
// Activate an inline edit on click of a table cell
$('#tblCylinders').on('click', 'tbody td:not(.child), tbody span.dtr-data', function (e) {
// Ignore the Responsive control and checkbox columns
if ($(this).hasClass('control') || $(this).hasClass('select-checkbox')) {
return;
}
if ($(this).hasClass('editable'))
editorCyl.inline(this);
});
You can use the li from the child row as a cell selector (since it represents a cell in the table, it has that ability built into Responsive) which will let you lookup the original cell and check its class.
Replies
Hi @jayasbury@ferrellgas.com ,
This example here is based on those links you created, and it's behaving as expected - only the editable fields in the responsive area are editable. Would you be able to change that example please to demonstrate your problem,
Cheers,
Colin
I'll try. What I am looking for is to click on the circled area of editable fields only. Let's say Defective Qty was not editable. The issue is in the ul, the fields do not have editable class.
Notice how the child row does not contain editable class anywhere.
Basically trying to do this
Something like this should do it: http://live.datatables.net/nemamuji/3/edit .
You can use the
li
from the child row as a cell selector (since it represents a cell in the table, it has that ability built into Responsive) which will let you lookup the original cell and check its class.Allan
Perfect. That solves the problem. Thanks.
Note, use this example now : http://live.datatables.net/nemamuji/11/edit : not the one in Allan's last reply,
Colin