PDA

View Full Version : [CLOSED] adding borders to columns in editable grid throws off columns in firefox 3



chrismcnally
7 May 2009, 12:04 PM
http://www.extjs.com/forum/images/icons/icon1.gif 1.2.3 grid data columns with borders longer than header columns
hi,

In my EditableGrid I am using styles to put a small border around a few columns. It looks great in IE but in Firefox 3 the calculation of the column width is wrong and eventually the data cells extend longer than the header row.

I can duplicate the issue by using your EditableGridExample.java and setting the style on a few of the ColumnConfigs, ie

column.setStyle("border-width:1px;border-style:inset;");

This drift seems to be caused by code in method getColumnWidth() in GridView. It uses the defined ColumnConfig widths to calculate the length of the entire row, but when building the widths for each cell it subtracts 2 from the width to make up for something that Firefox is doing. When I have borders around cells it needs to subtract 4 instead.

Although that would fix the problem, I doubt that's a good solution.

thanks

sven
7 May 2009, 12:07 PM
If you change some styling you may need to change more. This is not really a bug.

sven
7 May 2009, 12:29 PM
You need to override updateAllColumnWidths and adjust the width set for the fields for boxmodel issues. As this adds so many new calculations that are normally not needed, i dont think it should be added to the standard GridView.