Hi,
thanks for your question, and sorry for the trouble.
How are you hiding your first column here? Note that you can not hide it via the “Hide” button on the “Edit” screen. It must be hidden via that JS command.
Can you please post a link to the page with the table where this problem happens, so that I can take a direct look? Thanks!
Regards,
Tobias
Thanks for the quick reply.
I’m assuming that it is the { “bVisible”: false, “aTargets”: [ 0 ] } ] command that hides it.
Im not able to link to it because it is running internal. I can supply you with screendumbs or sourcecode.
I think i understood you question now.
I hide it from the Custom Commands in the Features of the Datatables Javascript Library. There i added
“aoColumnDefs”: [ { “iDataSort”: 0, “aTargets”: [ 1 ] }, { “bVisible”: false, “aTargets”: [ 0 ] } ]
Image
Hi,
correct, that’s the code that’s hiding the column. The other part of the code tells the JS library to use the data from column 0 when the user wants to sort column 1.
Just to be sure: Are you using the latest version of TablePress? The code changed there slightly (due to an updated version of the DataTables JS library), but the old format is converted automatically, whenever the table is saved.
Screenshots and source code won’t really help, unfortunately, as I’d need to inspect the page with the browser developer tools :-/
Regards,
Tobias
Im using Version 1.5.1 of TablePress and Version 1.0 of the DataTables Sorting extention.
Hi,
for which data format are you using the DataTables Sorting Plugins Extension? Can you try without that?
Regards,
Tobias
Hi again,
I have made a test site with a test table that shows you the issues im having:
http://testsite.klisterpapir.dk/
Allan
Hi Allan,
thanks for the link!
I did some testing, and it might be possible that we are running into a tiny issue with the data type of the "orderData" parameter, see https://datatables.net/forums/discussion/comment/63908/#Comment_63908
The fix might be as easy as making the integer value an array. Can you therefore please try again with
"aoColumnDefs": [ { "iDataSort": [ 0 ], "aTargets": [ 1 ] }, { "bVisible": false, "aTargets": [ 0 ] } ]
Regards,
Tobias
Hi Tobias,
Looks like I’ll be buying the beer next time I’m in Magdeburg….
Seems to be working perfect now!
Hi,
no problem, you are very welcome! 🙂 Good to hear that this helped!
Best wishes,
Tobias
P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!