Is there a way to simply change the order of columns in a perspective table having header translate() expression on each columns.
Currently, If I add or delete a column, all the bindings are offset.
This is caused by the fact that all bindings of a table are stored in a different dictionary then the columns properties. So when I delete the column, the binding dictionary indexes are not updated.
I currently have to copy the grid in a notepad++ and do the change in the json. then paste it back to ignition.
This bugbehavior of bindings on arrays is the source of longstanding complaints. It must be very difficult to solve, as it has not been solved and doesn't look like it will be solved.
The most common work-around is to bind the whole array and programmatically generate all of the array elements. Consider the approaches in this topic for optimizing, too:
That's somewhat counter-intuitive. The defining feature of an array is that it is ordered. If you didn't want that order, you might as well have had a map/dictionary instead. Like I said: not simple.
FWIW, I'm with you. The designer knows what bindings are present when the user asks it to insert or delete a row. I think, based on the principle of least surprise, that it should move the bindings. Alas, it does not.
As for automatic translation, I think not. The columns property is entirely user-supplied, and IA's auto-translation is generally restricted to the UI keys that are built-into the components.
Coincidentally, I have broken many things with the rearrange-array-items-but-not-bindings "feature". It's really fun when those things are svg element paths that are bound