I have a perspective table in which the property 'data' is assigned the following binding script:
cols = ["A","B","C"]
rows = [[10, 20, 30]]
return system.dataset.toDataSet(cols, rows)
The Table doesn't have any other property customized, in particular it doesn't have the columns array property assigned.
What I get is:
Now, let's shuffle the columns order:
cols = ["B","C","A"]
rows = [[20, 30, 10]]
return system.dataset.toDataSet(cols, rows)
The table seems to keep the column order provided in the dataset.
Now let's add another column:
cols = ["B","C","A", "10"]
rows = [[20, 30, 10, 40]]
return system.dataset.toDataSet(cols, rows)
When the column name is a string that can be converted into a number, it goes at the beginning. Please don't say that the numbers come before letters because this would be if an ordering was going on, and that is not the case as I showed in my second example.
This is relevant for my application because I'm generating a pivot that uses both numbers and strings as columns headers. As shown in my example, they are all handled as strings.
It seems to be a minor inconsistency in perspective's table component but it forces me to populate the columns list dinamically instead of using automatic columns generation.