Edit in View Only mode
Edit in View Only mode
Is there an easy way to open an Editor in "view only" mode? (Kind of like a property sheet)
Additionally, is there a way to get this button function into formOptions
? What I mean is, is there a way to configure Editor buttons in its instantiation?
dteEffectiveDates = new $.fn.dataTable.Editor({
// can I configure form buttons here? Can I get a button function here?
}).on('preOpen', function (e, mode, action) {
switch (action) {
case 'edit':
// disable editing if Locked
if (recordLocked) {
// disable all fields
dteEffectiveDates.disable();
// $('div.DTE_Form_Buttons button').attr('disabled', true);
// change what the Update button does
dteEffectiveDates.buttons({
text: 'OK',
action: function () {
this.close();
}
});
} else {
dteEffectiveDates.enable();
};
break;
default:
//do nothing
break;
};
});
This discussion has been closed.
Answers
Hi @raydlevel5 ,
I think we covered this in your other threads, here and here. If I'm missing something can you explain the difference please,
Cheers,
Colin
In summary:
editor.viewOnlyMode()
, or a 4th action:Create
,Edit
,Remove
, andView
.I promise to leave you alone for a while. Thank you for being there for me. I'm kinda a noob all alone in a corner. Sometimes they let me go outside.
Hi,
Agreed - this is something we've actually got in our feature tracker already, but no target release for it I'm afraid.
Allan