DataTables Extension - KeyTable - Is it useful without DataTables Edit?
DataTables Extension - KeyTable - Is it useful without DataTables Edit?
jLinux
Posts: 981Questions: 73Answers: 75
I was wondering, does anyone here have a use for the KeyTables Extension? I would like to use it, but im afraid I dont really see any use for it unless you're using the DataTables Edit extension.
I do however, use the jQuery x-editable plugin, which lets you edit the values in a table in place.... I would use the KeyTable Extension if it could be combined with that somehow, but im not sure it can.
I was just wondering who uses it, and for what? (Other than DT Edit)
Thanks!
This discussion has been closed.
Replies
KeyTable is largely linked to editing - it need not be restricted to only Editor - it has a full range of events that you can use with any library, but it could also be useful for item selection in a table.
Allan
Thanks allan, ill give it a shot then!
Ive nearly replaced the need for datatables edit using a lot of custom code with some dt callbacks and jquery xedit, i could post the jquery here if anyone wants it.
I do recommend datatables edit tho! Ill be switching to it, allan coded it so you know its great, lol
If you don't mind my asking, without going into lots of coding details, what advantage did you get by coding your own editing environment vs using Editor?
Getting Editor was an easy decision for us. I figured that it would take me way too long to write something (time is money) and then I would have to play compatibility games for the rest of my life.
I didnt know allan would let me use it in dev for free, i wasnt able to spare a single dollar at the time, and by the time allan said i could have it for dev purposes, i already had my code done
And it was fairly simple to code with xeditor and datatables api and callbacks
Trust me, if i could go back and change it, i would... id also use Laravel instead of Codeigniter, and use AngularJS for the frontend, but this release is nearly done.
Ill start version 2.0 after this is released, and without a doubt, itll have DT Edit, AngularJS and Laravel
Understood. That x-editor does look neat. Datatable's mature API (and documentation!) were big factors in my decision to go with it.
For sure. I seriously REALLY regret not asking Allan about it, I didnt know he was such a cool guy, lol. I definitely look forward to using it though.
Allan, ThomD, is it possible to have the keytable disabled for specific columns? I was hoping to disable it for the columns in my table that are for usernames and dates when the record was created, as those cant be interacted with
Yes. You can configure which columns are keytable enabled. I'd use a class as a selector.
https://datatables.net/reference/option/keys.columns
Ah, perfect, thank you!