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

Dojo Grids in XPages — All Blog Posts

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.

Grid_24_A

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.

Grid_24_B

Implementation

There are two steps required to make this work.

1) Add the dojox.grid.cells.dijit module to the XPage. (Resources > Add > Dojo Module…)

Grid - Edit Date Widget 2

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.)

Grid_24_C

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: