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.grid.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" : "enableDragDrop",
199 "desc" : "True to enable drag and drop of rows. Default is false.",
203 "name" : "dropTarget",
204 "type" : "Roo.dd.DropTarget",
205 "desc" : "An {@link Roo.dd.DropTarget} config",
210 "type" : "Roo.grid.AbstractSelectionModel",
211 "desc" : "The selection Model (default = Roo.grid.RowSelectionModel)",
215 "name" : "dragGroup",
217 "desc" : "- drag group (?? not sure if needed.)",
221 "name" : "autoHeight",
223 "desc" : "True to fit the height of the grid container to the height of the data. Default is false.",
229 "name" : "getSelectionModel",
231 "desc" : "Returns the grid's SelectionModel.",
232 "sig" : "()\n{\n\n}",
236 "isConstructor" : false,
248 "type" : "SelectionModel",
256 "desc" : "Destroy this grid.",
257 "sig" : "(removeEl)",
261 "isConstructor" : false,
273 "desc" : "True to remove the element",
280 "name" : "getColumnModel",
282 "desc" : "Returns the grid's ColumnModel.",
283 "sig" : "()\n{\n\n}",
287 "isConstructor" : false,
299 "type" : "ColumnModel",
305 "name" : "getGridEl",
307 "desc" : "Returns the grid's underlying element.",
308 "sig" : "()\n{\n\n}",
312 "isConstructor" : false,
325 "desc" : "The element"
330 "name" : "getDataSource",
332 "desc" : "Returns the grid's DataSource.",
333 "sig" : "()\n{\n\n}",
337 "isConstructor" : false,
349 "type" : "DataSource",
357 "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.",
358 "sig" : "()\n{\n\n}",
362 "isConstructor" : false,
376 "desc" : "Returns the grid's GridView object.",
377 "sig" : "()\n{\n\n}",
381 "isConstructor" : false,
399 "name" : "getDragDropText",
401 "desc" : "Called to get grid's drag proxy text, by default returns this.ddText.\nOverride this to put something different in the dragged text.",
402 "sig" : "()\n{\n\n}",
406 "isConstructor" : false,
424 "name" : "reconfigure",
426 "desc" : "Reconfigures the grid to use a different Store and Column Model.\nThe View will be bound to the new objects and refreshed.",
427 "sig" : "(dataSource, The)",
431 "isConstructor" : false,
441 "name" : "dataSource",
442 "type" : "Roo.data.Store",
443 "desc" : "The new {@link Roo.data.Store} object",
448 "type" : "Roo.grid.ColumnModel",
449 "desc" : "new {@link Roo.grid.ColumnModel} object",
456 "name" : "addColumns",
458 "desc" : "addColumns\nAdd's a column, default at the end..",
459 "sig" : "(position, of)",
463 "isConstructor" : false,
475 "desc" : "to add (default end)",
481 "desc" : "objects of column configuration see {@link Roo.grid.ColumnModel}",
490 "desc" : "Called once after all setup has been completed and the grid is ready to be rendered.",
491 "sig" : "()\n{\n\n}",
495 "isConstructor" : false,
507 "type" : "Roo.grid.Grid",
513 "name" : "purgeListeners",
515 "desc" : "Removes all listeners for this object",
516 "sig" : "()\n{\n\n}",
518 "memberOf" : "Roo.util.Observable",
520 "isConstructor" : false,
534 "desc" : "Appends an event handler to this element (shorthand for addListener)",
535 "sig" : "(eventName, handler, scope, options)",
537 "memberOf" : "Roo.util.Observable",
539 "isConstructor" : false,
549 "name" : "eventName",
551 "desc" : "The type of event to listen for",
557 "desc" : "The method the event invokes",
563 "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
569 "desc" : "(optional)",
578 "desc" : "Removes a listener (shorthand for removeListener)",
579 "sig" : "(eventName, handler, scope)",
581 "memberOf" : "Roo.util.Observable",
583 "isConstructor" : false,
593 "name" : "eventName",
595 "desc" : "The type of event to listen for",
601 "desc" : "The handler to remove",
607 "desc" : "(optional) The scope (this object) for the handler",
614 "name" : "addEvents",
616 "desc" : "Used to define events on this Observable",
619 "memberOf" : "Roo.util.Observable",
621 "isConstructor" : false,
633 "desc" : "The object with the events defined",
640 "name" : "releaseCapture",
642 "desc" : "Removes <b>all</b> added captures from the Observable.",
645 "memberOf" : "Roo.util.Observable",
647 "isConstructor" : false,
658 "type" : "Observable",
659 "desc" : "The Observable to release",
666 "name" : "removeListener",
668 "desc" : "Removes a listener",
669 "sig" : "(eventName, handler, scope)",
671 "memberOf" : "Roo.util.Observable",
673 "isConstructor" : false,
683 "name" : "eventName",
685 "desc" : "The type of event to listen for",
691 "desc" : "The handler to remove",
697 "desc" : "(optional) The scope (this object) for the handler",
704 "name" : "fireEvent",
706 "desc" : "Fires the specified event with the passed parameters (minus the event name).",
707 "sig" : "(eventName, args)",
709 "memberOf" : "Roo.util.Observable",
711 "isConstructor" : false,
721 "name" : "eventName",
728 "type" : "Object...",
729 "desc" : "Variable number of parameters are passed to handlers",
737 "desc" : "returns false if any of the handlers return false otherwise it returns true"
742 "name" : "hasListener",
744 "desc" : "Checks to see if this object has any listeners for a specified event",
745 "sig" : "(eventName)",
747 "memberOf" : "Roo.util.Observable",
749 "isConstructor" : false,
759 "name" : "eventName",
761 "desc" : "The name of the event to check for",
769 "desc" : "True if the event is being listened for, else false"
776 "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.",
777 "sig" : "(o, fn, scope)",
779 "memberOf" : "Roo.util.Observable",
781 "isConstructor" : false,
792 "type" : "Observable",
793 "desc" : "The Observable to capture",
799 "desc" : "The function to call",
805 "desc" : "(optional) The scope (this object) for the fn",
812 "name" : "addListener",
814 "desc" : "Appends an event handler to this component",
815 "sig" : "(eventName, handler, scope, options)",
817 "memberOf" : "Roo.util.Observable",
819 "isConstructor" : false,
829 "name" : "eventName",
831 "desc" : "The type of event to listen for",
837 "desc" : "The method the event invokes",
843 "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
849 "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>",
858 "name" : "rowcontextmenu",
860 "desc" : "Fires when a row is right clicked",
861 "sig" : "function (_self, rowIndex, e)\n{\n\n}",
882 "type" : "Roo.EventObject",
890 "name" : "columnmove",
892 "desc" : "Fires when the user moves a column",
893 "sig" : "function (oldIndex, newIndex)\n{\n\n}",
916 "name" : "headercontextmenu",
918 "desc" : "Fires when a header is right clicked",
919 "sig" : "function (_self, columnIndex, e)\n{\n\n}",
933 "name" : "columnIndex",
940 "type" : "Roo.EventObject",
950 "desc" : "Fires when the grid is rendered",
951 "sig" : "function (grid)\n{\n\n}",
968 "name" : "bodyscroll",
970 "desc" : "Fires when the body element is scrolled",
971 "sig" : "function (scrollLeft, scrollTop)\n{\n\n}",
979 "name" : "scrollLeft",
985 "name" : "scrollTop",
994 "name" : "columnresize",
996 "desc" : "Fires when the user resizes a column",
997 "sig" : "function (columnIndex, newSize)\n{\n\n}",
1005 "name" : "columnIndex",
1008 "isOptional" : false
1014 "isOptional" : false
1021 "type" : "function",
1022 "desc" : "Fires when a drag operation is complete",
1023 "sig" : "function (_self, dd, e)\n{\n\n}",
1034 "isOptional" : false
1038 "type" : "Roo.GridDD",
1039 "desc" : "The drag drop object",
1040 "isOptional" : false
1045 "desc" : "The raw browser event",
1046 "isOptional" : false
1052 "name" : "mouseout",
1053 "type" : "function",
1054 "desc" : "The raw mouseout event for the entire grid.",
1055 "sig" : "function (e)\n{\n\n}",
1064 "type" : "Roo.EventObject",
1066 "isOptional" : false
1072 "name" : "cellclick",
1073 "type" : "function",
1074 "desc" : "Fires when a cell is clicked",
1075 "sig" : "function (_self, rowIndex, columnIndex, e)\n{\n\n}",
1086 "isOptional" : false
1089 "name" : "rowIndex",
1092 "isOptional" : false
1095 "name" : "columnIndex",
1098 "isOptional" : false
1102 "type" : "Roo.EventObject",
1104 "isOptional" : false
1110 "name" : "dragover",
1111 "type" : "function",
1112 "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.",
1113 "sig" : "function (_self, dd, targetId, e)\n{\n\n}",
1124 "isOptional" : false
1128 "type" : "Roo.GridDD",
1129 "desc" : "The drag drop object",
1130 "isOptional" : false
1133 "name" : "targetId",
1135 "desc" : "The target drag drop object",
1136 "isOptional" : false
1141 "desc" : "The raw browser event",
1142 "isOptional" : false
1148 "name" : "rowclass",
1149 "type" : "function",
1150 "desc" : "Fires when a row is rendered, so you can change add a style to it.",
1151 "sig" : "function (gridview, rowcfg)\n{\n\n}",
1159 "name" : "gridview",
1160 "type" : "GridView",
1161 "desc" : "The grid view",
1162 "isOptional" : false
1167 "desc" : "contains record rowIndex and rowClass - set rowClass to add a style.",
1168 "isOptional" : false
1175 "type" : "function",
1176 "desc" : "The raw keydown event for the entire grid.",
1177 "sig" : "function (e)\n{\n\n}",
1186 "type" : "Roo.EventObject",
1188 "isOptional" : false
1194 "name" : "mousedown",
1195 "type" : "function",
1196 "desc" : "The raw mousedown event for the entire grid.",
1197 "sig" : "function (e)\n{\n\n}",
1206 "type" : "Roo.EventObject",
1208 "isOptional" : false
1214 "name" : "dragenter",
1215 "type" : "function",
1216 "desc" : "Fires when the dragged row(s) first cross another DD target while being dragged",
1217 "sig" : "function (_self, dd, targetId, e)\n{\n\n}",
1228 "isOptional" : false
1232 "type" : "Roo.GridDD",
1233 "desc" : "The drag drop object",
1234 "isOptional" : false
1237 "name" : "targetId",
1239 "desc" : "The target drag drop object",
1240 "isOptional" : false
1245 "desc" : "The raw browser event",
1246 "isOptional" : false
1253 "type" : "function",
1254 "desc" : "Fires when the dragged row(s) leave another DD target while being dragged",
1255 "sig" : "function (_self, dd, targetId, e)\n{\n\n}",
1266 "isOptional" : false
1270 "type" : "Roo.GridDD",
1271 "desc" : "The drag drop object",
1272 "isOptional" : false
1275 "name" : "targetId",
1277 "desc" : "The target drag drop object",
1278 "isOptional" : false
1283 "desc" : "The raw browser event",
1284 "isOptional" : false
1291 "type" : "function",
1292 "desc" : "The raw mouseup event for the entire grid.",
1293 "sig" : "function (e)\n{\n\n}",
1302 "type" : "Roo.EventObject",
1304 "isOptional" : false
1310 "name" : "keypress",
1311 "type" : "function",
1312 "desc" : "The raw keypress event for the entire grid.",
1313 "sig" : "function (e)\n{\n\n}",
1322 "type" : "Roo.EventObject",
1324 "isOptional" : false
1330 "name" : "headerclick",
1331 "type" : "function",
1332 "desc" : "Fires when a header is clicked",
1333 "sig" : "function (_self, columnIndex, e)\n{\n\n}",
1344 "isOptional" : false
1347 "name" : "columnIndex",
1350 "isOptional" : false
1354 "type" : "Roo.EventObject",
1356 "isOptional" : false
1362 "name" : "mouseover",
1363 "type" : "function",
1364 "desc" : "The raw mouseover event for the entire grid.",
1365 "sig" : "function (e)\n{\n\n}",
1374 "type" : "Roo.EventObject",
1376 "isOptional" : false
1382 "name" : "headerdblclick",
1383 "type" : "function",
1384 "desc" : "Fires when a header cell is double clicked",
1385 "sig" : "function (_self, columnIndex, e)\n{\n\n}",
1396 "isOptional" : false
1399 "name" : "columnIndex",
1402 "isOptional" : false
1406 "type" : "Roo.EventObject",
1408 "isOptional" : false
1414 "name" : "dragdrop",
1415 "type" : "function",
1416 "desc" : "Fires when dragged row(s) are dropped on a valid DD target",
1417 "sig" : "function (_self, dd, targetId, e)\n{\n\n}",
1428 "isOptional" : false
1432 "type" : "Roo.GridDD",
1433 "desc" : "The drag drop object",
1434 "isOptional" : false
1437 "name" : "targetId",
1439 "desc" : "The target drag drop object",
1440 "isOptional" : false
1445 "desc" : "The raw browser event",
1446 "isOptional" : false
1452 "name" : "rowclick",
1453 "type" : "function",
1454 "desc" : "Fires when a row is clicked",
1455 "sig" : "function (_self, rowIndex, e)\n{\n\n}",
1466 "isOptional" : false
1469 "name" : "rowIndex",
1472 "isOptional" : false
1476 "type" : "Roo.EventObject",
1478 "isOptional" : false
1485 "type" : "function",
1486 "desc" : "The raw click event for the entire grid.",
1487 "sig" : "function (e)\n{\n\n}",
1496 "type" : "Roo.EventObject",
1498 "isOptional" : false
1504 "name" : "rowdblclick",
1505 "type" : "function",
1506 "desc" : "Fires when a row is double clicked",
1507 "sig" : "function (_self, rowIndex, e)\n{\n\n}",
1518 "isOptional" : false
1521 "name" : "rowIndex",
1524 "isOptional" : false
1528 "type" : "Roo.EventObject",
1530 "isOptional" : false
1536 "name" : "startdrag",
1537 "type" : "function",
1538 "desc" : "Fires when row(s) start being dragged",
1539 "sig" : "function (_self, dd, e)\n{\n\n}",
1550 "isOptional" : false
1554 "type" : "Roo.GridDD",
1555 "desc" : "The drag drop object",
1556 "isOptional" : false
1561 "desc" : "The raw browser event",
1562 "isOptional" : false
1568 "name" : "dblclick",
1569 "type" : "function",
1570 "desc" : "The raw dblclick event for the entire grid.",
1571 "sig" : "function (e)\n{\n\n}",
1580 "type" : "Roo.EventObject",
1582 "isOptional" : false
1588 "name" : "cellcontextmenu",
1589 "type" : "function",
1590 "desc" : "Fires when a cell is right clicked",
1591 "sig" : "function (_self, rowIndex, cellIndex, e)\n{\n\n}",
1602 "isOptional" : false
1605 "name" : "rowIndex",
1608 "isOptional" : false
1611 "name" : "cellIndex",
1614 "isOptional" : false
1618 "type" : "Roo.EventObject",
1620 "isOptional" : false
1626 "name" : "contextmenu",
1627 "type" : "function",
1628 "desc" : "The raw contextmenu event for the entire grid.",
1629 "sig" : "function (e)\n{\n\n}",
1638 "type" : "Roo.EventObject",
1640 "isOptional" : false
1646 "name" : "celldblclick",
1647 "type" : "function",
1648 "desc" : "Fires when a cell is double clicked",
1649 "sig" : "function (_self, rowIndex, columnIndex, e)\n{\n\n}",
1660 "isOptional" : false
1663 "name" : "rowIndex",
1666 "isOptional" : false
1669 "name" : "columnIndex",
1672 "isOptional" : false
1676 "type" : "Roo.EventObject",
1678 "isOptional" : false