possibility to address columns by name instead of index
possibility to address columns by name instead of index
Hi there,
it might be a stupid question, but I did not find anything about this topic in the forum.
Is there a possibility to address columns with names instead of array indices?
To make my question clearer: When I have to change the table for some reason, I would have to change all functions
containing an index - e.g.: order: [[4, 'asc']], - If I would insert a column to the front of the table at a later point, I would have to
recode all the indices. If there was a field name e.g. [[last_name, 'acs']] , the problem with recoding would not exist. So it would me much easier to maintain.
Thx,
Bernhard
This question has an accepted answers - jump to answer
Answers
When using the
column()
/columns()
methods yes you can address a column by name (column-selector
), but as of yet you can't use a column name in theorder
option I'm afraid. That said, its on my feature list for v2!Allan
Hi Alan, thx for your answer!
Just to know, if I should wait for the new version 2.0 - do you have an idea, when you will release 2.0? I know - sich questions are difficult to answer ;-)
And will it be backwards compatible?
Best regards,
Bernhard
Sometime later this year - I'm afraid I don't know much more than that yet. And yes, there will be backwards compatibility.
Allan