PDA

View Full Version : [FIXED][3.0.0] Auto numbering the column ids?



wiznia
20 Jul 2009, 10:09 AM
Hi! I don't think this is a bug, because it looks like it was added with purpose, but here it goes:
In Ext 2.2 columns that didn't had an id setted received as the id the position in the columnModel (documentation states so even in 3.0: "Optional. A name which identifies this column (defaults to the column's initial ordinal position.)").
Now, the id is generated automatically starting from 0 and unique for all the columns in all the grids. This forces you to always set up an id for the columns if you want them to be stateful.
Is this a desirable change? Why don't stick up with the old method?

mjlecomte
20 Jul 2009, 11:34 AM
Thanks for the report.

I'm not sure if it was really intended to create unique column id's or not. Marking this as OPEN.

evant
20 Jul 2009, 9:25 PM
This still happens in Ext 3.0. I dropped the following code into the array grid example after it gets rendered:



var cm = grid.getColumnModel();
console.log(cm.getColumnId(0));
console.log(cm.getColumnId(1));


The column at index 1 doesn't have an id assigned and returns an automatically generated id. Marking this as closed.

wiznia
21 Jul 2009, 9:41 AM
No, it shouldn't be closed, the thing is that that column will have different id if for example you open it twice or you create another grid first.
I'm talking with mjlecomte in regard of this issue.

mjlecomte
21 Jul 2009, 7:12 PM
This issue was discussed further. A fix was tentatively applied to the trunk branch that gives the behavior like in 2.x where columns which do not have an id specified will use an autogenerated id based on the column's ordinal position in the column model config object.

See revs 4872, 4879, and 4882.

Updating the status of this thread to TENT.