View Full Version : [CLOSED] [2.0 Trunk] Grid ColumnConfig.setId() seems to prevent rendering

6 Jun 2009, 7:54 AM
As per the title, I have a grid which is rendering a GroupingView.

If I do not set the 'id' property on columns the values render correctly.

If I call columnConfig.setId("anyValue") then the values for that column do not render. Looking at firebug it seems the <div> element is created but it is empty and not closed.

Without setId the column value code looks like this which is correct...

<div class="x-grid3-cell-inner x-grid3-col-MyColumn">8</div>

With setId("myColumnId") the column value code looks like this which obviously renders nothing...

<div class="x-grid3-cell-inner x-grid3-col-MyColumn" id="myColumnId">

It would be good to get a fix on this as our testing framework relies on id attributes.



6 Jun 2009, 8:12 AM
They should never be an id set on a row. IDs have to be unique and you have more than one row in your grid or?

Can you please post some complete testcase for this?
The Basic grid example use setId and it works quite fine as it should work.

6 Jun 2009, 8:13 AM
Also when working on the trunk please make sure to always use the latest revision.

6 Jun 2009, 9:05 AM
To reproduce this....

Edit 'GroupingGridExample.java' as follows at line 42/43...

ColumnConfig company = new ColumnConfig("name", "Company", 60);

When run you will see that no value is rendered in the Company column.

6 Jun 2009, 9:10 AM
No and that is correct. You need to define a valid dataindex.

6 Jun 2009, 9:12 AM
Than you need to add


6 Jun 2009, 9:30 AM
Ok thanks - looks like my misunderstanding then...:">

Could you tell me what


is supposed to do?

The value renders now but I can't see what is has done that is special.



6 Jun 2009, 9:35 AM
Normally id and dataindex are the same. So if no dataindex is specified, the id is taken as dataindex. If you change now the id to a non existing field in the model, than you need to set a correct dataindex.