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.",
57 "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>",
58 "memberOf" : "Roo.util.Observable",
64 "type" : "Roo.grid.ColumnModel",
65 "desc" : "The columns of the grid",
71 "name" : "maxRowsToMeasure",
73 "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).",
79 "name" : "minColumnWidth",
81 "desc" : "The minimum width a column can be resized to. Default is 25.",
89 "desc" : "Configures the text is the drag proxy (defaults to \"%0 selected row(s)\").\n%0 is replaced with the number of selected rows.",
96 "type" : "Roo.Toolbar",
97 "desc" : "a toolbar for buttons etc.",
103 "name" : "autoExpandColumn",
105 "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.",
107 "isOptional" : false,
111 "name" : "autoExpandMax",
113 "desc" : "The maximum width the autoExpandColumn can have (if enabled). Default is 1000.",
115 "isOptional" : false,
119 "name" : "enableRowHeightSync",
121 "desc" : "True to manually sync row heights across locked and not locked rows. Default is false.",
123 "isOptional" : false,
127 "name" : "enableDrop",
129 "desc" : "True to enable drop of elements. Default is false. (double check if this is needed?)",
131 "isOptional" : false,
135 "name" : "monitorWindowResize",
137 "desc" : "True to autoSize the grid when the window resizes. Default is true.",
139 "isOptional" : false,
143 "name" : "autoExpandMin",
145 "desc" : "The minimum width the autoExpandColumn can have (if enabled).\nDefault is 50.",
147 "isOptional" : false,
152 "type" : "Roo.grid.GridView",
153 "desc" : "The view that renders the grid (default = Roo.grid.GridView)",
155 "isOptional" : false,
160 "type" : "Roo.data.Store",
161 "desc" : "The data store for the grid",
163 "isOptional" : false,
169 "desc" : "- drag drop group.",
171 "isOptional" : false,
175 "name" : "enableDrag",
177 "desc" : "True to enable drag of rows. Default is false. (double check if this is needed?)",
179 "isOptional" : false,
183 "name" : "autoWidth",
185 "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.",
187 "isOptional" : false,
191 "name" : "maxHeight",
193 "desc" : "Sets the maximum height of the grid - ignored if autoHeight is not on.",
195 "isOptional" : false,
199 "name" : "trackMouseOver",
201 "desc" : "True to highlight rows when the mouse is over. Default is true.",
203 "isOptional" : false,
209 "desc" : "An {@link Roo.LoadMask} config or true to mask the grid while loading. Default is false.",
211 "isOptional" : false,
215 "name" : "stripeRows",
217 "desc" : "True to stripe the rows. Default is true.",
219 "isOptional" : false,
223 "name" : "enableColumnMove",
225 "desc" : "True to enable drag and drop reorder of columns. Default is true.",
227 "isOptional" : false,
231 "name" : "enableColumnHide",
233 "desc" : "True to enable hiding of columns with the header context menu. Default is true.",
235 "isOptional" : false,
239 "name" : "autoSizeHeaders",
241 "desc" : "True to measure headers with column data when auto sizing columns. Default is true.",
243 "isOptional" : false,
247 "name" : "sortColMenu",
249 "desc" : "Sort the column order menu when it shows (usefull for long lists..) default false",
251 "isOptional" : false,
255 "name" : "enableDragDrop",
257 "desc" : "True to enable drag and drop of rows. Default is false.",
259 "isOptional" : false,
263 "name" : "dropTarget",
264 "type" : "Roo.dd.DropTarget",
265 "desc" : "An {@link Roo.dd.DropTarget} config",
267 "isOptional" : false,
272 "type" : "Roo.grid.AbstractSelectionModel",
273 "desc" : "The selection Model (default = Roo.grid.RowSelectionModel)",
275 "isOptional" : false,
279 "name" : "dragGroup",
281 "desc" : "- drag group (?? not sure if needed.)",
283 "isOptional" : false,
287 "name" : "autoHeight",
289 "desc" : "True to fit the height of the grid container to the height of the data. Default is false.",
291 "isOptional" : false,
297 "name" : "getSelectionModel",
299 "desc" : "Returns the grid's SelectionModel.",
300 "sig" : "()\n{\n\n}",
304 "isConstructor" : false,
316 "type" : "SelectionModel",
324 "desc" : "Destroy this grid.",
325 "sig" : "(removeEl)",
329 "isConstructor" : false,
341 "desc" : "True to remove the element",
348 "name" : "getColumnModel",
350 "desc" : "Returns the grid's ColumnModel.",
351 "sig" : "()\n{\n\n}",
355 "isConstructor" : false,
367 "type" : "ColumnModel",
373 "name" : "getGridEl",
375 "desc" : "Returns the grid's underlying element.",
376 "sig" : "()\n{\n\n}",
380 "isConstructor" : false,
393 "desc" : "The element"
398 "name" : "getDataSource",
400 "desc" : "Returns the grid's DataSource.",
401 "sig" : "()\n{\n\n}",
405 "isConstructor" : false,
417 "type" : "DataSource",
425 "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.",
426 "sig" : "()\n{\n\n}",
430 "isConstructor" : false,
444 "desc" : "Returns the grid's GridView object.",
445 "sig" : "()\n{\n\n}",
449 "isConstructor" : false,
467 "name" : "getDragDropText",
469 "desc" : "Called to get grid's drag proxy text, by default returns this.ddText.\nOverride this to put something different in the dragged text.",
470 "sig" : "()\n{\n\n}",
474 "isConstructor" : false,
492 "name" : "reconfigure",
494 "desc" : "Reconfigures the grid to use a different Store and Column Model.\nThe View will be bound to the new objects and refreshed.",
495 "sig" : "(dataSource, The)",
499 "isConstructor" : false,
509 "name" : "dataSource",
510 "type" : "Roo.data.Store",
511 "desc" : "The new {@link Roo.data.Store} object",
516 "type" : "Roo.grid.ColumnModel",
517 "desc" : "new {@link Roo.grid.ColumnModel} object",
524 "name" : "addColumns",
526 "desc" : "addColumns\nAdd's a column, default at the end..",
527 "sig" : "(position, of)",
531 "isConstructor" : false,
543 "desc" : "to add (default end)",
549 "desc" : "objects of column configuration see {@link Roo.grid.ColumnModel}",
558 "desc" : "Called once after all setup has been completed and the grid is ready to be rendered.",
559 "sig" : "()\n{\n\n}",
563 "isConstructor" : false,
575 "type" : "Roo.grid.Grid",
581 "name" : "purgeListeners",
583 "desc" : "Removes all listeners for this object",
584 "sig" : "()\n{\n\n}",
586 "memberOf" : "Roo.util.Observable",
588 "isConstructor" : false,
602 "desc" : "Appends an event handler to this element (shorthand for addListener)",
603 "sig" : "(eventName, handler, scope, options)",
605 "memberOf" : "Roo.util.Observable",
607 "isConstructor" : false,
617 "name" : "eventName",
619 "desc" : "The type of event to listen for",
625 "desc" : "The method the event invokes",
631 "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
637 "desc" : "(optional)",
646 "desc" : "Removes a listener (shorthand for removeListener)",
647 "sig" : "(eventName, handler, scope)",
649 "memberOf" : "Roo.util.Observable",
651 "isConstructor" : false,
661 "name" : "eventName",
663 "desc" : "The type of event to listen for",
669 "desc" : "The handler to remove",
675 "desc" : "(optional) The scope (this object) for the handler",
682 "name" : "addEvents",
684 "desc" : "Used to define events on this Observable",
687 "memberOf" : "Roo.util.Observable",
689 "isConstructor" : false,
701 "desc" : "The object with the events defined",
708 "name" : "releaseCapture",
710 "desc" : "Removes <b>all</b> added captures from the Observable.",
713 "memberOf" : "Roo.util.Observable",
715 "isConstructor" : false,
726 "type" : "Observable",
727 "desc" : "The Observable to release",
734 "name" : "removeListener",
736 "desc" : "Removes a listener",
737 "sig" : "(eventName, handler, scope)",
739 "memberOf" : "Roo.util.Observable",
741 "isConstructor" : false,
751 "name" : "eventName",
753 "desc" : "The type of event to listen for",
759 "desc" : "The handler to remove",
765 "desc" : "(optional) The scope (this object) for the handler",
772 "name" : "fireEvent",
774 "desc" : "Fires the specified event with the passed parameters (minus the event name).",
775 "sig" : "(eventName, args)",
777 "memberOf" : "Roo.util.Observable",
779 "isConstructor" : false,
789 "name" : "eventName",
796 "type" : "Object...",
797 "desc" : "Variable number of parameters are passed to handlers",
805 "desc" : "returns false if any of the handlers return false otherwise it returns true"
810 "name" : "hasListener",
812 "desc" : "Checks to see if this object has any listeners for a specified event",
813 "sig" : "(eventName)",
815 "memberOf" : "Roo.util.Observable",
817 "isConstructor" : false,
827 "name" : "eventName",
829 "desc" : "The name of the event to check for",
837 "desc" : "True if the event is being listened for, else false"
844 "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.",
845 "sig" : "(o, fn, scope)",
847 "memberOf" : "Roo.util.Observable",
849 "isConstructor" : false,
860 "type" : "Observable",
861 "desc" : "The Observable to capture",
867 "desc" : "The function to call",
873 "desc" : "(optional) The scope (this object) for the fn",
880 "name" : "addListener",
882 "desc" : "Appends an event handler to this component",
883 "sig" : "(eventName, handler, scope, options)",
885 "memberOf" : "Roo.util.Observable",
887 "isConstructor" : false,
897 "name" : "eventName",
899 "desc" : "The type of event to listen for",
905 "desc" : "The method the event invokes",
911 "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
917 "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>",
926 "name" : "rowcontextmenu",
928 "desc" : "Fires when a row is right clicked",
929 "sig" : "function (_self, rowIndex, e)\n{\n\n}",
950 "type" : "Roo.EventObject",
958 "name" : "columnmove",
960 "desc" : "Fires when the user moves a column",
961 "sig" : "function (oldIndex, newIndex)\n{\n\n}",
984 "name" : "headercontextmenu",
986 "desc" : "Fires when a header is right clicked",
987 "sig" : "function (_self, columnIndex, e)\n{\n\n}",
1001 "name" : "columnIndex",
1004 "isOptional" : false
1008 "type" : "Roo.EventObject",
1010 "isOptional" : false
1017 "type" : "function",
1018 "desc" : "Fires when the grid is rendered",
1019 "sig" : "function (grid)\n{\n\n}",
1030 "isOptional" : false
1036 "name" : "bodyscroll",
1037 "type" : "function",
1038 "desc" : "Fires when the body element is scrolled",
1039 "sig" : "function (scrollLeft, scrollTop)\n{\n\n}",
1047 "name" : "scrollLeft",
1050 "isOptional" : false
1053 "name" : "scrollTop",
1056 "isOptional" : false
1062 "name" : "columnresize",
1063 "type" : "function",
1064 "desc" : "Fires when the user resizes a column",
1065 "sig" : "function (columnIndex, newSize)\n{\n\n}",
1073 "name" : "columnIndex",
1076 "isOptional" : false
1082 "isOptional" : false
1089 "type" : "function",
1090 "desc" : "Fires when a drag operation is complete",
1091 "sig" : "function (_self, dd, e)\n{\n\n}",
1102 "isOptional" : false
1106 "type" : "Roo.GridDD",
1107 "desc" : "The drag drop object",
1108 "isOptional" : false
1113 "desc" : "The raw browser event",
1114 "isOptional" : false
1120 "name" : "mouseout",
1121 "type" : "function",
1122 "desc" : "The raw mouseout event for the entire grid.",
1123 "sig" : "function (e)\n{\n\n}",
1132 "type" : "Roo.EventObject",
1134 "isOptional" : false
1140 "name" : "cellclick",
1141 "type" : "function",
1142 "desc" : "Fires when a cell is clicked",
1143 "sig" : "function (_self, rowIndex, columnIndex, e)\n{\n\n}",
1154 "isOptional" : false
1157 "name" : "rowIndex",
1160 "isOptional" : false
1163 "name" : "columnIndex",
1166 "isOptional" : false
1170 "type" : "Roo.EventObject",
1172 "isOptional" : false
1178 "name" : "dragover",
1179 "type" : "function",
1180 "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.",
1181 "sig" : "function (_self, dd, targetId, e)\n{\n\n}",
1192 "isOptional" : false
1196 "type" : "Roo.GridDD",
1197 "desc" : "The drag drop object",
1198 "isOptional" : false
1201 "name" : "targetId",
1203 "desc" : "The target drag drop object",
1204 "isOptional" : false
1209 "desc" : "The raw browser event",
1210 "isOptional" : false
1216 "name" : "rowclass",
1217 "type" : "function",
1218 "desc" : "Fires when a row is rendered, so you can change add a style to it.",
1219 "sig" : "function (gridview, rowcfg)\n{\n\n}",
1227 "name" : "gridview",
1228 "type" : "GridView",
1229 "desc" : "The grid view",
1230 "isOptional" : false
1235 "desc" : "contains record rowIndex and rowClass - set rowClass to add a style.",
1236 "isOptional" : false
1243 "type" : "function",
1244 "desc" : "The raw keydown event for the entire grid.",
1245 "sig" : "function (e)\n{\n\n}",
1254 "type" : "Roo.EventObject",
1256 "isOptional" : false
1262 "name" : "mousedown",
1263 "type" : "function",
1264 "desc" : "The raw mousedown event for the entire grid.",
1265 "sig" : "function (e)\n{\n\n}",
1274 "type" : "Roo.EventObject",
1276 "isOptional" : false
1282 "name" : "dragenter",
1283 "type" : "function",
1284 "desc" : "Fires when the dragged row(s) first cross another DD target while being dragged",
1285 "sig" : "function (_self, dd, targetId, e)\n{\n\n}",
1296 "isOptional" : false
1300 "type" : "Roo.GridDD",
1301 "desc" : "The drag drop object",
1302 "isOptional" : false
1305 "name" : "targetId",
1307 "desc" : "The target drag drop object",
1308 "isOptional" : false
1313 "desc" : "The raw browser event",
1314 "isOptional" : false
1321 "type" : "function",
1322 "desc" : "Fires when the dragged row(s) leave another DD target while being dragged",
1323 "sig" : "function (_self, dd, targetId, e)\n{\n\n}",
1334 "isOptional" : false
1338 "type" : "Roo.GridDD",
1339 "desc" : "The drag drop object",
1340 "isOptional" : false
1343 "name" : "targetId",
1345 "desc" : "The target drag drop object",
1346 "isOptional" : false
1351 "desc" : "The raw browser event",
1352 "isOptional" : false
1359 "type" : "function",
1360 "desc" : "The raw mouseup event for the entire grid.",
1361 "sig" : "function (e)\n{\n\n}",
1370 "type" : "Roo.EventObject",
1372 "isOptional" : false
1378 "name" : "keypress",
1379 "type" : "function",
1380 "desc" : "The raw keypress event for the entire grid.",
1381 "sig" : "function (e)\n{\n\n}",
1390 "type" : "Roo.EventObject",
1392 "isOptional" : false
1398 "name" : "headerclick",
1399 "type" : "function",
1400 "desc" : "Fires when a header is clicked",
1401 "sig" : "function (_self, columnIndex, e)\n{\n\n}",
1412 "isOptional" : false
1415 "name" : "columnIndex",
1418 "isOptional" : false
1422 "type" : "Roo.EventObject",
1424 "isOptional" : false
1430 "name" : "mouseover",
1431 "type" : "function",
1432 "desc" : "The raw mouseover event for the entire grid.",
1433 "sig" : "function (e)\n{\n\n}",
1442 "type" : "Roo.EventObject",
1444 "isOptional" : false
1450 "name" : "headerdblclick",
1451 "type" : "function",
1452 "desc" : "Fires when a header cell is double clicked",
1453 "sig" : "function (_self, columnIndex, e)\n{\n\n}",
1464 "isOptional" : false
1467 "name" : "columnIndex",
1470 "isOptional" : false
1474 "type" : "Roo.EventObject",
1476 "isOptional" : false
1482 "name" : "dragdrop",
1483 "type" : "function",
1484 "desc" : "Fires when dragged row(s) are dropped on a valid DD target",
1485 "sig" : "function (_self, dd, targetId, e)\n{\n\n}",
1496 "isOptional" : false
1500 "type" : "Roo.GridDD",
1501 "desc" : "The drag drop object",
1502 "isOptional" : false
1505 "name" : "targetId",
1507 "desc" : "The target drag drop object",
1508 "isOptional" : false
1513 "desc" : "The raw browser event",
1514 "isOptional" : false
1520 "name" : "rowclick",
1521 "type" : "function",
1522 "desc" : "Fires when a row is clicked",
1523 "sig" : "function (_self, rowIndex, e)\n{\n\n}",
1534 "isOptional" : false
1537 "name" : "rowIndex",
1540 "isOptional" : false
1544 "type" : "Roo.EventObject",
1546 "isOptional" : false
1553 "type" : "function",
1554 "desc" : "The raw click event for the entire grid.",
1555 "sig" : "function (e)\n{\n\n}",
1564 "type" : "Roo.EventObject",
1566 "isOptional" : false
1572 "name" : "rowdblclick",
1573 "type" : "function",
1574 "desc" : "Fires when a row is double clicked",
1575 "sig" : "function (_self, rowIndex, e)\n{\n\n}",
1586 "isOptional" : false
1589 "name" : "rowIndex",
1592 "isOptional" : false
1596 "type" : "Roo.EventObject",
1598 "isOptional" : false
1604 "name" : "startdrag",
1605 "type" : "function",
1606 "desc" : "Fires when row(s) start being dragged",
1607 "sig" : "function (_self, dd, e)\n{\n\n}",
1618 "isOptional" : false
1622 "type" : "Roo.GridDD",
1623 "desc" : "The drag drop object",
1624 "isOptional" : false
1629 "desc" : "The raw browser event",
1630 "isOptional" : false
1636 "name" : "dblclick",
1637 "type" : "function",
1638 "desc" : "The raw dblclick event for the entire grid.",
1639 "sig" : "function (e)\n{\n\n}",
1648 "type" : "Roo.EventObject",
1650 "isOptional" : false
1656 "name" : "cellcontextmenu",
1657 "type" : "function",
1658 "desc" : "Fires when a cell is right clicked",
1659 "sig" : "function (_self, rowIndex, cellIndex, e)\n{\n\n}",
1670 "isOptional" : false
1673 "name" : "rowIndex",
1676 "isOptional" : false
1679 "name" : "cellIndex",
1682 "isOptional" : false
1686 "type" : "Roo.EventObject",
1688 "isOptional" : false
1694 "name" : "contextmenu",
1695 "type" : "function",
1696 "desc" : "The raw contextmenu event for the entire grid.",
1697 "sig" : "function (e)\n{\n\n}",
1706 "type" : "Roo.EventObject",
1708 "isOptional" : false
1714 "name" : "celldblclick",
1715 "type" : "function",
1716 "desc" : "Fires when a cell is double clicked",
1717 "sig" : "function (_self, rowIndex, columnIndex, e)\n{\n\n}",
1728 "isOptional" : false
1731 "name" : "rowIndex",
1734 "isOptional" : false
1737 "name" : "columnIndex",
1740 "isOptional" : false
1744 "type" : "Roo.EventObject",
1746 "isOptional" : false