Categories | Question details Back To List | ||
GRID: Automatically distribute column widths across a fixed-width table? Hi, Is it possible to specify the total width of a grid (in pixels), and have the columns size themselves automatically to fill up the entire width of the grid? The number of columns may vary, so I can't specify the size of each column in pixels in advance. EG. In HTML, if I specify: <TABLE style="width:500px;"> <TR> <TD style="width:10%"></TD> <TD style="width:10%"></TD> <TD style="width:10%"></TD> ... etc... ...even though the total % width of all the cells may add up to MORE or LESS than 100%, the browser will still render the cells so they add up to 500 pixels (the width of the table). Can this be done also in DHTMLX Grid? Thanks, Jon. Answer posted by Support on Sep 03, 2008 01:56 Yes, you can specify the total widht of grid in normal way ( through styles of grid's HTML container ) and use mygrid.setInitWidths("*,*,*,*,*,*,*,*") * as size will force column to take all available space ( the same can be used while init from XML as well ) |