KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Datatables Sorting Plugin Needed or help with custom script #2891

Open cfsinc opened this topic on on Nov 30, 2022 - 5 comments

cfsinc commented on Nov 30, 2022

I have a column that has a letter like P then a space and a number

I need to be able to custom sort the clolumn first by the letter and then by the number after the letter.

not sure if this natural sorting plugin will work from datatables but i have no idea how to apply it?

https://datatables.net/plug-ins/sorting/natural

cfsinc commented on Dec 1, 2022

Ready and happy to pay for training in the area of DataTables plugins, minify, unminify js files, etc. when you are available your time 9AM to 11AM any day.

cfsinc commented on Dec 8, 2022

Thank you so much!!!

David Winterburn commented on Dec 8, 2022

Damien, we are very glad to be able to help you a bit with DataTables. Certainly if you have any question don't hesitate to let us know and we will try to response asap. Have a nice day there. Sincerely,

cfsinc commented on Dec 8, 2022

Thank you for the training. To recap how to add a 3rd party plugin from datatables put the plugin in directory koolreport/datagrid/DataTables directory newplugin.js then call the plugin from plugins option. Then inspect network, JS in browser to see that the plugin is loaded.

Sebastian Morales commented on Dec 8, 2022

Yes, that should be the method. After making sure the custom plugin is loaded, you can now set its options in DataTables::create(...).

Another note is that you can use a sub-directory for each plugin. Says you put "newplugin.js" inside "datagrid/DataTables/mynewplugin", then to load it:

DataTables::create([
    ...
    "plugins" => ["mynewplugin/newplugin.js"],
    ...
]);

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
help needed

DataGrid