|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
Grid columns with auto width in IEHi,
I've recently moved from grids with the autoWidth attribute enabled to grids with width="auto" columns. It works better in some situations and worse in others but I've finally managed to get what I want. In Chrome and Firefox, that is, because IE8 renders the table correctly but does not fit the whole available space. Any idea why?
Regards
_______________________________________________ FAQ: http://dojotoolkit.org/support/faq Book: http://docs.dojocampus.org Dojo-interest@... http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest |
|
|
Re: Grid columns with auto width in IEColumns with width="auto" are not fully supported, and do not work in
all cases. In addition, they are poorly performant. The main reason for this is the "dynamic" nature of the grid itself. The grid needs to start laying itself out *before* it has any data - so it does not have a way to "know" how wide to draw the columns - because we don't have the data. Depending on the browser, we are able to make a "best guess" - but it doesn't work in all situations. I would strongly suggest moving away from using width="auto" columns. We are even considering deprecating their use in upcoming releases of the grid. I'm pretty sure that's not the answer you wanted to hear - but that's the state of the grid right now. The only way that we are able to support width="auto" is to: 1 - require that all data be present (so we can figure out the "widest" value for the column) 2 - render all data at once (so that we are sure we have rendered the "widest" value) 3 - render the grid twice (once to lay out the values and calculate the widest one - another time to actually set all the widths to the width of the widest value) Each of these greatly hurts the grid - and in reality is not feasible. #1 would mean that you are unable to use stores such as JsonRestStore or QueryReadStore with a grid. #2 will really impact your performance...because it throws away all the benefits of incremental rendering and virtual scrolling...you'll never be able to have million-row grids like you can right now. #3 is bad - especially in combination with #2 - since, in effect, it will take twice as long to display your grid...and you will get "flickering" - that is, you will see it render once with different cell widths, and then it will redraw again. Again - don't use width="auto". It's very much not recommended, and will not be supported in the future. -Nathan On Aug 18, 2009, at 12:38 PM, Jose Noheda wrote: > Hi, > > I've recently moved from grids with the autoWidth attribute enabled > to grids with width="auto" columns. It works better in some > situations and worse in others but I've finally managed to get what > I want. In Chrome and Firefox, that is, because IE8 renders the > table correctly but does not fit the whole available space. Any idea > why? > > Regards > _______________________________________________ > FAQ: http://dojotoolkit.org/support/faq > Book: http://docs.dojocampus.org > Dojo-interest@... > http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest _______________________________________________ FAQ: http://dojotoolkit.org/support/faq Book: http://docs.dojocampus.org Dojo-interest@... http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest |
| Free embeddable forum powered by Nabble | Forum Help |