},
editor: 'dijit/ColorPalette',
editorArgs: {
fromEditor: function(v, cell){
return v || cell.data(); //If no color selected, use the original one.
} // End of fromEditor
} // End of editorArgs
}
Note the editor property. It says that that the editor for this column will be the ColorPalette.
gridx/modules/Filter
This module adds the core capability to filter the rows in the grid. It supplies two core functions:
• setFilter() - Sets a function to filter the data.
• getFilter() - Gets the current function used to filter the data.
These functions define the filter algorithm used to filter the data.
gridx/modules/filter/FilterBar
This module provides a filter bar to select the filtering of the data. This module requires that
gridx/modules/Filter also be installed.
gridx/modules/Menu
The Menu module provides support for context menus within the grid. A context menu is shown
with a right-click action upon the grid. When the Menu module is added to the grid, a new object
can be found at grid.menu. This object exposes two methods for working with menus. The first
is called bind(menuDijit, bindArgs). The first parameter is an instance of a menu created
by Dojo. The second parameter describes how the menu is to be bound to the grid. The is an object
which can contain:
• hookPoint (String) - This may be one of:
◦ "cell",
◦ "header"
◦ "headercell"
◦ "row"
◦ "body"
◦ "grid".
• selected (Boolean) - Should the menu be bound only to the selected items
When a menu item is fired, the gridx.menu.context property determines what it is that the
menu is being applied to. The properties contained in this are:
• cell
• column - Only set when hookPoint is headercell.
• grid
• row – An instance of a gridx/core/row representing the row that was clicked. Only
set when hookPoint is "row".
Page 184
Kommentare zu diesen Handbüchern