X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/ee06f37b0f6f6d94cd05a6ffae556660f7c4a2bc..c930e9176a5a85509c5b0230e2bff5c22a591432:/src/widgets/grid/CheckboxSelectionModel.js?ds=sidebyside diff --git a/src/widgets/grid/CheckboxSelectionModel.js b/src/widgets/grid/CheckboxSelectionModel.js new file mode 100644 index 00000000..408fb981 --- /dev/null +++ b/src/widgets/grid/CheckboxSelectionModel.js @@ -0,0 +1,103 @@ +/*! + * Ext JS Library 3.0.0 + * Copyright(c) 2006-2009 Ext JS, LLC + * licensing@extjs.com + * http://www.extjs.com/license + */ +/** + * @class Ext.grid.CheckboxSelectionModel + * @extends Ext.grid.RowSelectionModel + * A custom selection model that renders a column of checkboxes that can be toggled to select or deselect rows. + * @constructor + * @param {Object} config The configuration options + */ +Ext.grid.CheckboxSelectionModel = Ext.extend(Ext.grid.RowSelectionModel, { + + /** + * @cfg {Boolean} checkOnly true if rows can only be selected by clicking on the + * checkbox column (defaults to false). + */ + /** + * @cfg {String} header Any valid text or HTML fragment to display in the header cell for the + * checkbox column. Defaults to:
+ * '<div class="x-grid3-hd-checker"> </div>'
+ *
+ * The default CSS class of 'x-grid3-hd-checker' displays a checkbox in the header
+ * and provides support for automatic check all/none behavior on header click. This string
+ * can be replaced by any valid HTML fragment, including a simple text string (e.g.,
+ * 'Select Rows'), but the automatic check all/none behavior will only work if the
+ * 'x-grid3-hd-checker' class is supplied.
+ */
+ header: '