SMART datagrid v.1 > Examples

Back  Forward

Grid Fitting  Example

If specify DisplayOptions.fitStyle as GridFitStyle.EVEN, when the sum of the width of the displayed columns is less than the internal width of the grid, it will align in the top columns evenly to fill the grid with the entire columns. 

If specify as GridFitStyle.FILL rather than "even"Column.fillWidth will align the remaining width in the specified columns proportionately. In the example below, it has specified fillWidth of the last "Unit" column as 1 to widen only "Unit" column if there is remaining width. 

If specify as GridFitStyle.EVEN_FILL, when the width of the entire column is widened, it will also reduce the width of the columns evenly to fit the width of the grid. 

Grid - 1
rows

If specify DisplayOptions.hideBordersWhenFitted as true, when you align the width of the column to the grid, it will not draw the right border of the last right cell of the header, footer and each row to display more neatly. 

View Source JSP 

See Also
GridFitStyle
DisplayOptions.hideBordersWhenFitted