Opened 14 years ago

Closed 13 years ago

#6979 closed enhancement (worksforme)

Resize grid columns using css rules instead of element style

Reported by: [email protected] Owned by: Nathan Toone
Priority: high Milestone: 1.4
Component: DojoX Grid Version:
Keywords: grid column resize Cc:
Blocked By: Blocking:


The current grid column resizing works by setting width in the style of every dojoxGrid-cell in the grid. It might be faster to apply a class to each cell in a column using a naming convention like ${id}_col(1..n) and just change the width of the css class when resizing columns.

Also it would be nice to have an active resizing option on grid columns.

Change History (6)

comment:1 Changed 14 years ago by bill

Cc: [email protected] removed
Reporter: changed from guest to [email protected]

Sounds like you might be solving a problem that doesn't exist (is column resizing slow now?), but if you did change it then wouldn't it be better to have a single CSS rule like this?

#myGrid1 col1 { width: 100px; }

(and every cell in column 1 has class col1)

comment:2 Changed 14 years ago by guest

I think in circumstances that are not all that uncommon grid resizing is definately slow. A grid with lots of rows and columns running in IE6 generally has poor resize performance, especially if you are scrolled down a bit from the top of the grid. The change to use dojo.dnd to do the resize has made the performance even worse.

I think a resize causes a complete re-render of the grid at the moment (could be wrong but am 90% sure it does), which involves generating the innerhtml for all visible rows. I believe that this is unnecessary when all that should be done is the existing nodes have their css class rule updated.

I think your way of using CSS for specifying column width is even better than my initial suggestion.

Anthony Fryer

comment:3 Changed 14 years ago by Bryan Forbes

Milestone: 1.3

Deferring to 1.3.

comment:4 Changed 13 years ago by Bryan Forbes

Milestone: 1.31.4

comment:5 Changed 13 years ago by Nathan Toone

Owner: changed from Bryan Forbes to Nathan Toone

Reassigning to me

comment:6 Changed 13 years ago by Nathan Toone

Resolution: worksforme
Status: newclosed

So it sounds to me that the issue has been solved by specifying column width. Agreed that grid resizing is slow - but those performance issues can be tracked in different tickets.

Closing this for now - as it appears to be a non-issue anymore.

Note: See TracTickets for help on using tickets.