2 "name" : "Roo.grid.Grid",
7 "Roo.grid.EditorGrid" : [
8 "Roo.grid.PropertyGrid"
17 "desc" : "This class represents the primary interface of a component based grid control.\n<br><br>Usage:<pre><code>\n var grid = new Roo.grid.Grid(\"my-container-id\", {\n ds: myDataStore,\n cm: myColModel,\n selModel: mySelectionModel,\n autoSizeColumns: true,\n monitorWindowResize: false,\n trackMouseOver: true\n });\n // set any options\n grid.render();\n</code></pre>\n<b>Common Problems:</b><br/>\n- Grid does not resize properly when going smaller: Setting overflow hidden on the container\nelement will correct this<br/>\n- If you get el.style[camel]= NaNpx or -2px or something related, be certain you have given your container element\ndimensions. The grid adapts to your container's size, if your container has no size defined then the results\nare unpredictable.<br/>\n- Do not render the grid into an element with display:none. Try using visibility:hidden. Otherwise there is no way for the\ngrid to calculate dimensions/offsets.<br/>",
18 "isSingleton" : false,
22 "isBuilderTop" : false,
31 "type" : "String/HTMLElement/Roo.Element",
32 "desc" : "The element into which this grid will be rendered -\nThe container MUST have some type of size defined for the grid to fill. The container will be\nautomatically set to position relative if it isn't already.",
38 "desc" : "A config object that sets properties on this grid.",
47 "name" : "autoSizeColumns",
49 "desc" : "True to automatically resize the columns to fit their content\n<b>on initial render.</b> It is more efficient to explicitly size the columns\nthrough the ColumnModel's {@link Roo.grid.ColumnModel#width} config option. Default is false.",
55 "desc" : "list of events and functions to call for this object, \nFor example :\n<pre><code>\n listeners : { \n 'click' : function(e) {\n ..... \n } ,\n .... \n } \n </code></pre>",
56 "memberOf" : "Roo.util.Observable"
60 "type" : "Roo.grid.ColumnModel",
61 "desc" : "The columns of the grid",
65 "name" : "maxRowsToMeasure",
67 "desc" : "If autoSizeColumns is on, maxRowsToMeasure can be used to limit the number of\nrows measured to get a columns size. Default is 0 (all rows).",
71 "name" : "minColumnWidth",
73 "desc" : "The minimum width a column can be resized to. Default is 25.",
79 "desc" : "Configures the text is the drag proxy (defaults to \"%0 selected row(s)\").\n%0 is replaced with the number of selected rows.",
84 "type" : "Roo.Toolbar",
85 "desc" : "a toolbar for buttons etc.",
89 "name" : "autoExpandColumn",
91 "desc" : "The id (or dataIndex) of a column in this grid that should expand to fill unused space. This id can not be 0. Default is false.",
95 "name" : "autoExpandMax",
97 "desc" : "The maximum width the autoExpandColumn can have (if enabled). Default is 1000.",
101 "name" : "enableRowHeightSync",
103 "desc" : "True to manually sync row heights across locked and not locked rows. Default is false.",
107 "name" : "enableDrop",
109 "desc" : "True to enable drop of elements. Default is false. (double check if this is needed?)",
113 "name" : "monitorWindowResize",
115 "desc" : "True to autoSize the grid when the window resizes. Default is true.",
119 "name" : "autoExpandMin",
121 "desc" : "The minimum width the autoExpandColumn can have (if enabled).\nDefault is 50.",
126 "type" : "Roo.grid.GridView",
127 "desc" : "The view that renders the grid (default = Roo.grid.GridView)",
132 "type" : "Roo.data.Store",
133 "desc" : "The data store for the grid",
139 "desc" : "- drag drop group.",
143 "name" : "enableDrag",
145 "desc" : "True to enable drag of rows. Default is false. (double check if this is needed?)",
149 "name" : "autoWidth",
151 "desc" : "True to set the grid's width to the default total width of the grid's columns instead\nof a fixed width. Default is false.",
155 "name" : "maxHeight",
157 "desc" : "Sets the maximum height of the grid - ignored if autoHeight is not on.",
161 "name" : "trackMouseOver",
163 "desc" : "True to highlight rows when the mouse is over. Default is true.",
169 "desc" : "An {@link Roo.LoadMask} config or true to mask the grid while loading. Default is false.",
173 "name" : "stripeRows",
175 "desc" : "True to stripe the rows. Default is true.",
179 "name" : "enableColumnMove",
181 "desc" : "True to enable drag and drop reorder of columns. Default is true.",
185 "name" : "enableColumnHide",
187 "desc" : "True to enable hiding of columns with the header context menu. Default is true.",
191 "name" : "autoSizeHeaders",
193 "desc" : "True to measure headers with column data when auto sizing columns. Default is true.",
197 "name" : "sortColMenu",
199 "desc" : "Sort the column order menu when it shows (usefull for long lists..) default false",
203 "name" : "enableDragDrop",
205 "desc" : "True to enable drag and drop of rows. Default is false.",
209 "name" : "dropTarget",
210 "type" : "Roo.dd.DropTarget",
211 "desc" : "An {@link Roo.dd.DropTarget} config",
216 "type" : "Roo.grid.AbstractSelectionModel",
217 "desc" : "The selection Model (default = Roo.grid.RowSelectionModel)",
221 "name" : "dragGroup",
223 "desc" : "- drag group (?? not sure if needed.)",
227 "name" : "autoHeight",
229 "desc" : "True to fit the height of the grid container to the height of the data. Default is false.",
235 "name" : "getSelectionModel",
237 "desc" : "Returns the grid's SelectionModel.",
238 "sig" : "()\n{\n\n}",
242 "isConstructor" : false,
254 "type" : "SelectionModel",
262 "desc" : "Destroy this grid.",
263 "sig" : "(removeEl)",
267 "isConstructor" : false,
279 "desc" : "True to remove the element",
286 "name" : "getColumnModel",
288 "desc" : "Returns the grid's ColumnModel.",
289 "sig" : "()\n{\n\n}",
293 "isConstructor" : false,
305 "type" : "ColumnModel",
311 "name" : "getGridEl",
313 "desc" : "Returns the grid's underlying element.",
314 "sig" : "()\n{\n\n}",
318 "isConstructor" : false,
331 "desc" : "The element"
336 "name" : "getDataSource",
338 "desc" : "Returns the grid's DataSource.",
339 "sig" : "()\n{\n\n}",
343 "isConstructor" : false,
355 "type" : "DataSource",
363 "desc" : "Causes the grid to manually recalculate its dimensions. Generally this is done automatically,\nbut if manual update is required this method will initiate it.",
364 "sig" : "()\n{\n\n}",
368 "isConstructor" : false,
382 "desc" : "Returns the grid's GridView object.",
383 "sig" : "()\n{\n\n}",
387 "isConstructor" : false,
405 "name" : "getDragDropText",
407 "desc" : "Called to get grid's drag proxy text, by default returns this.ddText.\nOverride this to put something different in the dragged text.",
408 "sig" : "()\n{\n\n}",
412 "isConstructor" : false,
430 "name" : "reconfigure",
432 "desc" : "Reconfigures the grid to use a different Store and Column Model.\nThe View will be bound to the new objects and refreshed.",
433 "sig" : "(dataSource, The)",
437 "isConstructor" : false,
447 "name" : "dataSource",
448 "type" : "Roo.data.Store",
449 "desc" : "The new {@link Roo.data.Store} object",
454 "type" : "Roo.grid.ColumnModel",
455 "desc" : "new {@link Roo.grid.ColumnModel} object",
462 "name" : "addColumns",
464 "desc" : "addColumns\nAdd's a column, default at the end..",
465 "sig" : "(position, of)",
469 "isConstructor" : false,
481 "desc" : "to add (default end)",
487 "desc" : "objects of column configuration see {@link Roo.grid.ColumnModel}",
496 "desc" : "Called once after all setup has been completed and the grid is ready to be rendered.",
497 "sig" : "()\n{\n\n}",
501 "isConstructor" : false,
513 "type" : "Roo.grid.Grid",
519 "name" : "purgeListeners",
521 "desc" : "Removes all listeners for this object",
522 "sig" : "()\n{\n\n}",
524 "memberOf" : "Roo.util.Observable",
526 "isConstructor" : false,
540 "desc" : "Appends an event handler to this element (shorthand for addListener)",
541 "sig" : "(eventName, handler, scope, options)",
543 "memberOf" : "Roo.util.Observable",
545 "isConstructor" : false,
555 "name" : "eventName",
557 "desc" : "The type of event to listen for",
563 "desc" : "The method the event invokes",
569 "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
575 "desc" : "(optional)",
584 "desc" : "Removes a listener (shorthand for removeListener)",
585 "sig" : "(eventName, handler, scope)",
587 "memberOf" : "Roo.util.Observable",
589 "isConstructor" : false,
599 "name" : "eventName",
601 "desc" : "The type of event to listen for",
607 "desc" : "The handler to remove",
613 "desc" : "(optional) The scope (this object) for the handler",
620 "name" : "addEvents",
622 "desc" : "Used to define events on this Observable",
625 "memberOf" : "Roo.util.Observable",
627 "isConstructor" : false,
639 "desc" : "The object with the events defined",
646 "name" : "releaseCapture",
648 "desc" : "Removes <b>all</b> added captures from the Observable.",
651 "memberOf" : "Roo.util.Observable",
653 "isConstructor" : false,
664 "type" : "Observable",
665 "desc" : "The Observable to release",
672 "name" : "removeListener",
674 "desc" : "Removes a listener",
675 "sig" : "(eventName, handler, scope)",
677 "memberOf" : "Roo.util.Observable",
679 "isConstructor" : false,
689 "name" : "eventName",
691 "desc" : "The type of event to listen for",
697 "desc" : "The handler to remove",
703 "desc" : "(optional) The scope (this object) for the handler",
710 "name" : "fireEvent",
712 "desc" : "Fires the specified event with the passed parameters (minus the event name).",
713 "sig" : "(eventName, args)",
715 "memberOf" : "Roo.util.Observable",
717 "isConstructor" : false,
727 "name" : "eventName",
734 "type" : "Object...",
735 "desc" : "Variable number of parameters are passed to handlers",
743 "desc" : "returns false if any of the handlers return false otherwise it returns true"
748 "name" : "hasListener",
750 "desc" : "Checks to see if this object has any listeners for a specified event",
751 "sig" : "(eventName)",
753 "memberOf" : "Roo.util.Observable",
755 "isConstructor" : false,
765 "name" : "eventName",
767 "desc" : "The name of the event to check for",
775 "desc" : "True if the event is being listened for, else false"
782 "desc" : "Starts capture on the specified Observable. All events will be passed\nto the supplied function with the event name + standard signature of the event\n<b>before</b> the event is fired. If the supplied function returns false,\nthe event will not fire.",
783 "sig" : "(o, fn, scope)",
785 "memberOf" : "Roo.util.Observable",
787 "isConstructor" : false,
798 "type" : "Observable",
799 "desc" : "The Observable to capture",
805 "desc" : "The function to call",
811 "desc" : "(optional) The scope (this object) for the fn",
818 "name" : "addListener",
820 "desc" : "Appends an event handler to this component",
821 "sig" : "(eventName, handler, scope, options)",
823 "memberOf" : "Roo.util.Observable",
825 "isConstructor" : false,
835 "name" : "eventName",
837 "desc" : "The type of event to listen for",
843 "desc" : "The method the event invokes",
849 "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
855 "desc" : "(optional) An object containing handler configuration\nproperties. This may contain any of the following properties:<ul>\n<li>scope {Object} The scope in which to execute the handler function. The handler function's \"this\" context.</li>\n<li>delay {Number} The number of milliseconds to delay the invocation of the handler after te event fires.</li>\n<li>single {Boolean} True to add a handler to handle just the next firing of the event, and then remove itself.</li>\n<li>buffer {Number} Causes the handler to be scheduled to run in an {@link Roo.util.DelayedTask} delayed\nby the specified number of milliseconds. If the event fires again within that time, the original\nhandler is <em>not</em> invoked, but the new handler is scheduled in its place.</li>\n</ul><br>\n<p>\n<b>Combining Options</b><br>\nUsing the options argument, it is possible to combine different types of listeners:<br>\n<br>\nA normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId)\n\t\t<pre><code>\n\t\tel.on('click', this.onClick, this, {\n \t\t\tsingle: true,\n \t\tdelay: 100,\n \t\tforumId: 4\n\t\t});\n\t\t</code></pre>\n<p>\n<b>Attaching multiple handlers in 1 call</b><br>\nThe method also allows for a single argument to be passed which is a config object containing properties\nwhich specify multiple handlers.\n<pre><code>\n\t\tel.on({\n\t\t\t'click': {\n \t\tfn: this.onClick,\n \t\tscope: this,\n \t\tdelay: 100\n \t\t}, \n \t\t'mouseover': {\n \t\tfn: this.onMouseOver,\n \t\tscope: this\n \t\t},\n \t\t'mouseout': {\n \t\tfn: this.onMouseOut,\n \t\tscope: this\n \t\t}\n\t\t});\n\t\t</code></pre>\n<p>\nOr a shorthand syntax which passes the same scope object to all handlers:\n \t<pre><code>\n\t\tel.on({\n\t\t\t'click': this.onClick,\n \t\t'mouseover': this.onMouseOver,\n \t\t'mouseout': this.onMouseOut,\n \t\tscope: this\n\t\t});\n\t\t</code></pre>",
864 "name" : "rowcontextmenu",
866 "desc" : "Fires when a row is right clicked",
867 "sig" : "function (_self, rowIndex, e)\n{\n\n}",
888 "type" : "Roo.EventObject",
896 "name" : "columnmove",
898 "desc" : "Fires when the user moves a column",
899 "sig" : "function (oldIndex, newIndex)\n{\n\n}",
922 "name" : "headercontextmenu",
924 "desc" : "Fires when a header is right clicked",
925 "sig" : "function (_self, columnIndex, e)\n{\n\n}",
939 "name" : "columnIndex",
946 "type" : "Roo.EventObject",
956 "desc" : "Fires when the grid is rendered",
957 "sig" : "function (grid)\n{\n\n}",
974 "name" : "bodyscroll",
976 "desc" : "Fires when the body element is scrolled",
977 "sig" : "function (scrollLeft, scrollTop)\n{\n\n}",
985 "name" : "scrollLeft",
991 "name" : "scrollTop",
1000 "name" : "columnresize",
1001 "type" : "function",
1002 "desc" : "Fires when the user resizes a column",
1003 "sig" : "function (columnIndex, newSize)\n{\n\n}",
1011 "name" : "columnIndex",
1014 "isOptional" : false
1020 "isOptional" : false
1027 "type" : "function",
1028 "desc" : "Fires when a drag operation is complete",
1029 "sig" : "function (_self, dd, e)\n{\n\n}",
1040 "isOptional" : false
1044 "type" : "Roo.GridDD",
1045 "desc" : "The drag drop object",
1046 "isOptional" : false
1051 "desc" : "The raw browser event",
1052 "isOptional" : false
1058 "name" : "mouseout",
1059 "type" : "function",
1060 "desc" : "The raw mouseout event for the entire grid.",
1061 "sig" : "function (e)\n{\n\n}",
1070 "type" : "Roo.EventObject",
1072 "isOptional" : false
1078 "name" : "cellclick",
1079 "type" : "function",
1080 "desc" : "Fires when a cell is clicked",
1081 "sig" : "function (_self, rowIndex, columnIndex, e)\n{\n\n}",
1092 "isOptional" : false
1095 "name" : "rowIndex",
1098 "isOptional" : false
1101 "name" : "columnIndex",
1104 "isOptional" : false
1108 "type" : "Roo.EventObject",
1110 "isOptional" : false
1116 "name" : "dragover",
1117 "type" : "function",
1118 "desc" : "Fires while row(s) are being dragged. \"targetId\" is the id of the Yahoo.util.DD object the selected rows are being dragged over.",
1119 "sig" : "function (_self, dd, targetId, e)\n{\n\n}",
1130 "isOptional" : false
1134 "type" : "Roo.GridDD",
1135 "desc" : "The drag drop object",
1136 "isOptional" : false
1139 "name" : "targetId",
1141 "desc" : "The target drag drop object",
1142 "isOptional" : false
1147 "desc" : "The raw browser event",
1148 "isOptional" : false
1154 "name" : "rowclass",
1155 "type" : "function",
1156 "desc" : "Fires when a row is rendered, so you can change add a style to it.",
1157 "sig" : "function (gridview, rowcfg)\n{\n\n}",
1165 "name" : "gridview",
1166 "type" : "GridView",
1167 "desc" : "The grid view",
1168 "isOptional" : false
1173 "desc" : "contains record rowIndex and rowClass - set rowClass to add a style.",
1174 "isOptional" : false
1181 "type" : "function",
1182 "desc" : "The raw keydown event for the entire grid.",
1183 "sig" : "function (e)\n{\n\n}",
1192 "type" : "Roo.EventObject",
1194 "isOptional" : false
1200 "name" : "mousedown",
1201 "type" : "function",
1202 "desc" : "The raw mousedown event for the entire grid.",
1203 "sig" : "function (e)\n{\n\n}",
1212 "type" : "Roo.EventObject",
1214 "isOptional" : false
1220 "name" : "dragenter",
1221 "type" : "function",
1222 "desc" : "Fires when the dragged row(s) first cross another DD target while being dragged",
1223 "sig" : "function (_self, dd, targetId, e)\n{\n\n}",
1234 "isOptional" : false
1238 "type" : "Roo.GridDD",
1239 "desc" : "The drag drop object",
1240 "isOptional" : false
1243 "name" : "targetId",
1245 "desc" : "The target drag drop object",
1246 "isOptional" : false
1251 "desc" : "The raw browser event",
1252 "isOptional" : false
1259 "type" : "function",
1260 "desc" : "Fires when the dragged row(s) leave another DD target while being dragged",
1261 "sig" : "function (_self, dd, targetId, e)\n{\n\n}",
1272 "isOptional" : false
1276 "type" : "Roo.GridDD",
1277 "desc" : "The drag drop object",
1278 "isOptional" : false
1281 "name" : "targetId",
1283 "desc" : "The target drag drop object",
1284 "isOptional" : false
1289 "desc" : "The raw browser event",
1290 "isOptional" : false
1297 "type" : "function",
1298 "desc" : "The raw mouseup event for the entire grid.",
1299 "sig" : "function (e)\n{\n\n}",
1308 "type" : "Roo.EventObject",
1310 "isOptional" : false
1316 "name" : "keypress",
1317 "type" : "function",
1318 "desc" : "The raw keypress event for the entire grid.",
1319 "sig" : "function (e)\n{\n\n}",
1328 "type" : "Roo.EventObject",
1330 "isOptional" : false
1336 "name" : "headerclick",
1337 "type" : "function",
1338 "desc" : "Fires when a header is clicked",
1339 "sig" : "function (_self, columnIndex, e)\n{\n\n}",
1350 "isOptional" : false
1353 "name" : "columnIndex",
1356 "isOptional" : false
1360 "type" : "Roo.EventObject",
1362 "isOptional" : false
1368 "name" : "mouseover",
1369 "type" : "function",
1370 "desc" : "The raw mouseover event for the entire grid.",
1371 "sig" : "function (e)\n{\n\n}",
1380 "type" : "Roo.EventObject",
1382 "isOptional" : false
1388 "name" : "headerdblclick",
1389 "type" : "function",
1390 "desc" : "Fires when a header cell is double clicked",
1391 "sig" : "function (_self, columnIndex, e)\n{\n\n}",
1402 "isOptional" : false
1405 "name" : "columnIndex",
1408 "isOptional" : false
1412 "type" : "Roo.EventObject",
1414 "isOptional" : false
1420 "name" : "dragdrop",
1421 "type" : "function",
1422 "desc" : "Fires when dragged row(s) are dropped on a valid DD target",
1423 "sig" : "function (_self, dd, targetId, e)\n{\n\n}",
1434 "isOptional" : false
1438 "type" : "Roo.GridDD",
1439 "desc" : "The drag drop object",
1440 "isOptional" : false
1443 "name" : "targetId",
1445 "desc" : "The target drag drop object",
1446 "isOptional" : false
1451 "desc" : "The raw browser event",
1452 "isOptional" : false
1458 "name" : "rowclick",
1459 "type" : "function",
1460 "desc" : "Fires when a row is clicked",
1461 "sig" : "function (_self, rowIndex, e)\n{\n\n}",
1472 "isOptional" : false
1475 "name" : "rowIndex",
1478 "isOptional" : false
1482 "type" : "Roo.EventObject",
1484 "isOptional" : false
1491 "type" : "function",
1492 "desc" : "The raw click event for the entire grid.",
1493 "sig" : "function (e)\n{\n\n}",
1502 "type" : "Roo.EventObject",
1504 "isOptional" : false
1510 "name" : "rowdblclick",
1511 "type" : "function",
1512 "desc" : "Fires when a row is double clicked",
1513 "sig" : "function (_self, rowIndex, e)\n{\n\n}",
1524 "isOptional" : false
1527 "name" : "rowIndex",
1530 "isOptional" : false
1534 "type" : "Roo.EventObject",
1536 "isOptional" : false
1542 "name" : "startdrag",
1543 "type" : "function",
1544 "desc" : "Fires when row(s) start being dragged",
1545 "sig" : "function (_self, dd, e)\n{\n\n}",
1556 "isOptional" : false
1560 "type" : "Roo.GridDD",
1561 "desc" : "The drag drop object",
1562 "isOptional" : false
1567 "desc" : "The raw browser event",
1568 "isOptional" : false
1574 "name" : "dblclick",
1575 "type" : "function",
1576 "desc" : "The raw dblclick event for the entire grid.",
1577 "sig" : "function (e)\n{\n\n}",
1586 "type" : "Roo.EventObject",
1588 "isOptional" : false
1594 "name" : "cellcontextmenu",
1595 "type" : "function",
1596 "desc" : "Fires when a cell is right clicked",
1597 "sig" : "function (_self, rowIndex, cellIndex, e)\n{\n\n}",
1608 "isOptional" : false
1611 "name" : "rowIndex",
1614 "isOptional" : false
1617 "name" : "cellIndex",
1620 "isOptional" : false
1624 "type" : "Roo.EventObject",
1626 "isOptional" : false
1632 "name" : "contextmenu",
1633 "type" : "function",
1634 "desc" : "The raw contextmenu event for the entire grid.",
1635 "sig" : "function (e)\n{\n\n}",
1644 "type" : "Roo.EventObject",
1646 "isOptional" : false
1652 "name" : "celldblclick",
1653 "type" : "function",
1654 "desc" : "Fires when a cell is double clicked",
1655 "sig" : "function (_self, rowIndex, columnIndex, e)\n{\n\n}",
1666 "isOptional" : false
1669 "name" : "rowIndex",
1672 "isOptional" : false
1675 "name" : "columnIndex",
1678 "isOptional" : false
1682 "type" : "Roo.EventObject",
1684 "isOptional" : false