We are using the grid to display potentially quite large rowsets (2000 rows) in virtual mode. However we want one of the cells in a row to be a combo box. We can of course loop over 2000 rows and set the cells but this is very slow.
obj.setCellTemplate(new AW.Templates.Combo, 1,i);
Alternatively we can dynamically alter the cell template in the onCurrentRowChanging and onCurrentRowChanged events to be a combo box only for the current row. Then for the row we just came from, we turn it back into a standard text cell.
This does work - and is by far our preferred solution - but we have to call the grid's refresh method every time we do this or the new combo box does not display. This is very slow for a 2000 row grid even in virtual mode, and before scrolling, so this is also not ideal.
Is there a better way of achieving this?. Can we refresh just the active row (and possibly the row we came from?)
Wednesday, October 11, 2006
You can assign the cell template using only column argument -
obj.setCellTemplate(new AW.Templates.Combo, 1);
In this case the template will be assigned to all rows (column-1).