I am using the jQuery plug-in Datatables, is it possible to change the order of the columns without changing the source data?
Here is an Example of what I have now.
Currently it is LicenseNumber, FirstName, LastName
I would like it to be FirstName, LastName, LicenseNumber
Is there a parameter I can add to the datatable setup?
Not entirely sure I’ve understood the question, but this might be of use:
(1) DataTables has a ColReorder plugin.
http://datatables.net/extensions/colreorder/
In the link above, you can select a column with your mouse and then drag the column to a different position in the table.
In another example of using the ColReorder plugin, you can predefine your
column order, as stated on the datatables site:
http://datatables.net/release-datatables/extensions/ColReorder/examples/predefined.html
(2) I believe you could also make use of aoColumnDefs and mDataProp if your data was an array of objects. (also see http://datatables.net/usage/columns)