Dojo Data Grid – Part 24: Using a Multiline Editor in an Editable Column
In the last post, I showed how to use a ComboBox in an editable column. In this post, I’ll show how you can use a multiline editor in an editable grid column.
Dojo Data Grid Series
Multiline Editor Features
A standard editable cell is a single line. When you hit the [Enter] key while typing, it will finish editing the cell and jump to the next editable cell.
With the Editor cell type, you get a multiline editable cell. You can hit the [Enter] key to start a new line. If you take up more space than is available, you will get a scroll bar, so this is much more useful for editing larger pieces of text in the grid.
There are two steps required to make this work.
1) Add the dojox.grid.cells.dijit module to the XPage. (Resources > Add > Dojo Module…)
2) Set a date column’s editable property to true and enter dojox.grid.cells.Editor in the column’s cellType property. (You’ll have to type it in directly — it’s not an option in the list.)