2 "name" : "Roo.grid.Grid",
6 "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 "type" : "String/HTMLElement/Roo.Element",
19 "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.",
25 "desc" : "A config object that sets properties on this grid.",
34 "name" : "autoSizeColumns",
36 "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.",
42 "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>",
43 "memberOf" : "Roo.util.Observable"
47 "type" : "Roo.grid.ColumnModel",
48 "desc" : "The columns of the grid",
52 "name" : "maxRowsToMeasure",
54 "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).",
58 "name" : "minColumnWidth",
60 "desc" : "The minimum width a column can be resized to. Default is 25.",
66 "desc" : "Configures the text is the drag proxy (defaults to \"%0 selected row(s)\").\n%0 is replaced with the number of selected rows.",
71 "type" : "Roo.Toolbar",
72 "desc" : "a toolbar for buttons etc.",
76 "name" : "autoExpandColumn",
78 "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.",
82 "name" : "autoExpandMax",
84 "desc" : "The maximum width the autoExpandColumn can have (if enabled). Default is 1000.",
88 "name" : "enableRowHeightSync",
90 "desc" : "True to manually sync row heights across locked and not locked rows. Default is false.",
94 "name" : "enableDrop",
96 "desc" : "True to enable drop of elements. Default is false. (double check if this is needed?)",
100 "name" : "monitorWindowResize",
102 "desc" : "True to autoSize the grid when the window resizes. Default is true.",
106 "name" : "autoExpandMin",
108 "desc" : "The minimum width the autoExpandColumn can have (if enabled).\nDefault is 50.",
113 "type" : "Roo.grid.GridView",
114 "desc" : "The view that renders the grid (default = Roo.grid.GridView)",
119 "type" : "Roo.grid.Store",
120 "desc" : "The data store for the grid",
126 "desc" : "- drag drop group.",
130 "name" : "enableDrag",
132 "desc" : "True to enable drag of rows. Default is false. (double check if this is needed?)",
136 "name" : "autoWidth",
138 "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.",
142 "name" : "maxHeight",
144 "desc" : "Sets the maximum height of the grid - ignored if autoHeight is not on.",
148 "name" : "trackMouseOver",
150 "desc" : "True to highlight rows when the mouse is over. Default is true.",
156 "desc" : "An {@link Roo.LoadMask} config or true to mask the grid while loading. Default is false.",
160 "name" : "stripeRows",
162 "desc" : "True to stripe the rows. Default is true.",
166 "name" : "enableColumnMove",
168 "desc" : "True to enable drag and drop reorder of columns. Default is true.",
172 "name" : "enableColumnHide",
174 "desc" : "True to enable hiding of columns with the header context menu. Default is true.",
178 "name" : "autoSizeHeaders",
180 "desc" : "True to measure headers with column data when auto sizing columns. Default is true.",
184 "name" : "enableDragDrop",
186 "desc" : "True to enable drag and drop of rows. Default is false.",
190 "name" : "dropTarget",
191 "type" : "Roo.dd.DropTarget",
192 "desc" : "An {@link Roo.dd.DropTarget} config",
197 "type" : "Roo.grid.AbstractSelectionModel",
198 "desc" : "The selection Model (default = Roo.grid.RowSelectionModel)",
202 "name" : "dragGroup",
204 "desc" : "- drag group (?? not sure if needed.)",
208 "name" : "autoHeight",
210 "desc" : "True to fit the height of the grid container to the height of the data. Default is false.",
216 "name" : "getSelectionModel",
218 "desc" : "Returns the grid's SelectionModel.",
219 "sig" : "()\n{\n\n}",
223 "isConstructor" : false,
235 "type" : "SelectionModel",
243 "desc" : "Destroy this grid.",
244 "sig" : "(removeEl)",
248 "isConstructor" : false,
260 "desc" : "True to remove the element",
267 "name" : "getColumnModel",
269 "desc" : "Returns the grid's ColumnModel.",
270 "sig" : "()\n{\n\n}",
274 "isConstructor" : false,
286 "type" : "ColumnModel",
292 "name" : "getGridEl",
294 "desc" : "Returns the grid's underlying element.",
295 "sig" : "()\n{\n\n}",
299 "isConstructor" : false,
312 "desc" : "The element"
317 "name" : "getDataSource",
319 "desc" : "Returns the grid's DataSource.",
320 "sig" : "()\n{\n\n}",
324 "isConstructor" : false,
336 "type" : "DataSource",
344 "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.",
345 "sig" : "()\n{\n\n}",
349 "isConstructor" : false,
363 "desc" : "Returns the grid's GridView object.",
364 "sig" : "()\n{\n\n}",
368 "isConstructor" : false,
386 "name" : "getDragDropText",
388 "desc" : "Called to get grid's drag proxy text, by default returns this.ddText.\nOverride this to put something different in the dragged text.",
389 "sig" : "()\n{\n\n}",
393 "isConstructor" : false,
411 "name" : "reconfigure",
413 "desc" : "Reconfigures the grid to use a different Store and Column Model.\nThe View will be bound to the new objects and refreshed.",
414 "sig" : "(dataSource, The)",
418 "isConstructor" : false,
428 "name" : "dataSource",
429 "type" : "Roo.data.Store",
430 "desc" : "The new {@link Roo.data.Store} object",
435 "type" : "Roo.grid.ColumnModel",
436 "desc" : "new {@link Roo.grid.ColumnModel} object",
443 "name" : "addColumns",
445 "desc" : "addColumns\nAdd's a column, default at the end..",
446 "sig" : "(position, of)",
450 "isConstructor" : false,
462 "desc" : "to add (default end)",
468 "desc" : "objects of column configuration see {@link Roo.grid.ColumnModel}",
477 "desc" : "Called once after all setup has been completed and the grid is ready to be rendered.",
478 "sig" : "()\n{\n\n}",
482 "isConstructor" : false,
494 "type" : "Roo.grid.Grid",
500 "name" : "purgeListeners",
502 "desc" : "Removes all listeners for this object",
503 "sig" : "()\n{\n\n}",
505 "memberOf" : "Roo.util.Observable",
507 "isConstructor" : false,
521 "desc" : "Appends an event handler to this element (shorthand for addListener)",
522 "sig" : "(eventName, handler, scope, options)",
524 "memberOf" : "Roo.util.Observable",
526 "isConstructor" : false,
536 "name" : "eventName",
538 "desc" : "The type of event to listen for",
544 "desc" : "The method the event invokes",
550 "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
556 "desc" : "(optional)",
565 "desc" : "Removes a listener (shorthand for removeListener)",
566 "sig" : "(eventName, handler, scope)",
568 "memberOf" : "Roo.util.Observable",
570 "isConstructor" : false,
580 "name" : "eventName",
582 "desc" : "The type of event to listen for",
588 "desc" : "The handler to remove",
594 "desc" : "(optional) The scope (this object) for the handler",
601 "name" : "addEvents",
603 "desc" : "Used to define events on this Observable",
606 "memberOf" : "Roo.util.Observable",
608 "isConstructor" : false,
620 "desc" : "The object with the events defined",
627 "name" : "releaseCapture",
629 "desc" : "Removes <b>all</b> added captures from the Observable.",
632 "memberOf" : "Roo.util.Observable",
634 "isConstructor" : false,
645 "type" : "Observable",
646 "desc" : "The Observable to release",
653 "name" : "removeListener",
655 "desc" : "Removes a listener",
656 "sig" : "(eventName, handler, scope)",
658 "memberOf" : "Roo.util.Observable",
660 "isConstructor" : false,
670 "name" : "eventName",
672 "desc" : "The type of event to listen for",
678 "desc" : "The handler to remove",
684 "desc" : "(optional) The scope (this object) for the handler",
691 "name" : "fireEvent",
693 "desc" : "Fires the specified event with the passed parameters (minus the event name).",
694 "sig" : "(eventName, args)",
696 "memberOf" : "Roo.util.Observable",
698 "isConstructor" : false,
708 "name" : "eventName",
715 "type" : "Object...",
716 "desc" : "Variable number of parameters are passed to handlers",
724 "desc" : "returns false if any of the handlers return false otherwise it returns true"
729 "name" : "hasListener",
731 "desc" : "Checks to see if this object has any listeners for a specified event",
732 "sig" : "(eventName)",
734 "memberOf" : "Roo.util.Observable",
736 "isConstructor" : false,
746 "name" : "eventName",
748 "desc" : "The name of the event to check for",
756 "desc" : "True if the event is being listened for, else false"
763 "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.",
764 "sig" : "(o, fn, scope)",
766 "memberOf" : "Roo.util.Observable",
768 "isConstructor" : false,
779 "type" : "Observable",
780 "desc" : "The Observable to capture",
786 "desc" : "The function to call",
792 "desc" : "(optional) The scope (this object) for the fn",
799 "name" : "addListener",
801 "desc" : "Appends an event handler to this component",
802 "sig" : "(eventName, handler, scope, options)",
804 "memberOf" : "Roo.util.Observable",
806 "isConstructor" : false,
816 "name" : "eventName",
818 "desc" : "The type of event to listen for",
824 "desc" : "The method the event invokes",
830 "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
836 "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>",
845 "name" : "rowcontextmenu",
847 "desc" : "Fires when a row is right clicked",
848 "sig" : "function (_self, rowIndex, e)\n{\n\n}",
869 "type" : "Roo.EventObject",
877 "name" : "columnmove",
879 "desc" : "Fires when the user moves a column",
880 "sig" : "function (oldIndex, newIndex)\n{\n\n}",
903 "name" : "headercontextmenu",
905 "desc" : "Fires when a header is right clicked",
906 "sig" : "function (_self, columnIndex, e)\n{\n\n}",
920 "name" : "columnIndex",
927 "type" : "Roo.EventObject",
937 "desc" : "Fires when the grid is rendered",
938 "sig" : "function (grid)\n{\n\n}",
955 "name" : "bodyscroll",
957 "desc" : "Fires when the body element is scrolled",
958 "sig" : "function (scrollLeft, scrollTop)\n{\n\n}",
966 "name" : "scrollLeft",
972 "name" : "scrollTop",
981 "name" : "columnresize",
983 "desc" : "Fires when the user resizes a column",
984 "sig" : "function (columnIndex, newSize)\n{\n\n}",
992 "name" : "columnIndex",
1001 "isOptional" : false
1008 "type" : "function",
1009 "desc" : "Fires when a drag operation is complete",
1010 "sig" : "function (_self, dd, e)\n{\n\n}",
1021 "isOptional" : false
1025 "type" : "Roo.GridDD",
1026 "desc" : "The drag drop object",
1027 "isOptional" : false
1032 "desc" : "The raw browser event",
1033 "isOptional" : false
1039 "name" : "mouseout",
1040 "type" : "function",
1041 "desc" : "The raw mouseout event for the entire grid.",
1042 "sig" : "function (e)\n{\n\n}",
1051 "type" : "Roo.EventObject",
1053 "isOptional" : false
1059 "name" : "cellclick",
1060 "type" : "function",
1061 "desc" : "Fires when a cell is clicked",
1062 "sig" : "function (_self, rowIndex, columnIndex, e)\n{\n\n}",
1073 "isOptional" : false
1076 "name" : "rowIndex",
1079 "isOptional" : false
1082 "name" : "columnIndex",
1085 "isOptional" : false
1089 "type" : "Roo.EventObject",
1091 "isOptional" : false
1097 "name" : "dragover",
1098 "type" : "function",
1099 "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.",
1100 "sig" : "function (_self, dd, targetId, e)\n{\n\n}",
1111 "isOptional" : false
1115 "type" : "Roo.GridDD",
1116 "desc" : "The drag drop object",
1117 "isOptional" : false
1120 "name" : "targetId",
1122 "desc" : "The target drag drop object",
1123 "isOptional" : false
1128 "desc" : "The raw browser event",
1129 "isOptional" : false
1135 "name" : "rowclass",
1136 "type" : "function",
1137 "desc" : "Fires when a row is rendered, so you can change add a style to it.",
1138 "sig" : "function (gridview, rowcfg)\n{\n\n}",
1146 "name" : "gridview",
1147 "type" : "GridView",
1148 "desc" : "The grid view",
1149 "isOptional" : false
1154 "desc" : "contains record rowIndex and rowClass - set rowClass to add a style.",
1155 "isOptional" : false
1162 "type" : "function",
1163 "desc" : "The raw keydown event for the entire grid.",
1164 "sig" : "function (e)\n{\n\n}",
1173 "type" : "Roo.EventObject",
1175 "isOptional" : false
1181 "name" : "mousedown",
1182 "type" : "function",
1183 "desc" : "The raw mousedown event for the entire grid.",
1184 "sig" : "function (e)\n{\n\n}",
1193 "type" : "Roo.EventObject",
1195 "isOptional" : false
1201 "name" : "dragenter",
1202 "type" : "function",
1203 "desc" : "Fires when the dragged row(s) first cross another DD target while being dragged",
1204 "sig" : "function (_self, dd, targetId, e)\n{\n\n}",
1215 "isOptional" : false
1219 "type" : "Roo.GridDD",
1220 "desc" : "The drag drop object",
1221 "isOptional" : false
1224 "name" : "targetId",
1226 "desc" : "The target drag drop object",
1227 "isOptional" : false
1232 "desc" : "The raw browser event",
1233 "isOptional" : false
1240 "type" : "function",
1241 "desc" : "Fires when the dragged row(s) leave another DD target while being dragged",
1242 "sig" : "function (_self, dd, targetId, e)\n{\n\n}",
1253 "isOptional" : false
1257 "type" : "Roo.GridDD",
1258 "desc" : "The drag drop object",
1259 "isOptional" : false
1262 "name" : "targetId",
1264 "desc" : "The target drag drop object",
1265 "isOptional" : false
1270 "desc" : "The raw browser event",
1271 "isOptional" : false
1278 "type" : "function",
1279 "desc" : "The raw mouseup event for the entire grid.",
1280 "sig" : "function (e)\n{\n\n}",
1289 "type" : "Roo.EventObject",
1291 "isOptional" : false
1297 "name" : "keypress",
1298 "type" : "function",
1299 "desc" : "The raw keypress event for the entire grid.",
1300 "sig" : "function (e)\n{\n\n}",
1309 "type" : "Roo.EventObject",
1311 "isOptional" : false
1317 "name" : "headerclick",
1318 "type" : "function",
1319 "desc" : "Fires when a header is clicked",
1320 "sig" : "function (_self, columnIndex, e)\n{\n\n}",
1331 "isOptional" : false
1334 "name" : "columnIndex",
1337 "isOptional" : false
1341 "type" : "Roo.EventObject",
1343 "isOptional" : false
1349 "name" : "mouseover",
1350 "type" : "function",
1351 "desc" : "The raw mouseover event for the entire grid.",
1352 "sig" : "function (e)\n{\n\n}",
1361 "type" : "Roo.EventObject",
1363 "isOptional" : false
1369 "name" : "headerdblclick",
1370 "type" : "function",
1371 "desc" : "Fires when a header cell is double clicked",
1372 "sig" : "function (_self, columnIndex, e)\n{\n\n}",
1383 "isOptional" : false
1386 "name" : "columnIndex",
1389 "isOptional" : false
1393 "type" : "Roo.EventObject",
1395 "isOptional" : false
1401 "name" : "dragdrop",
1402 "type" : "function",
1403 "desc" : "Fires when dragged row(s) are dropped on a valid DD target",
1404 "sig" : "function (_self, dd, targetId, e)\n{\n\n}",
1415 "isOptional" : false
1419 "type" : "Roo.GridDD",
1420 "desc" : "The drag drop object",
1421 "isOptional" : false
1424 "name" : "targetId",
1426 "desc" : "The target drag drop object",
1427 "isOptional" : false
1432 "desc" : "The raw browser event",
1433 "isOptional" : false
1439 "name" : "rowclick",
1440 "type" : "function",
1441 "desc" : "Fires when a row is clicked",
1442 "sig" : "function (_self, rowIndex, e)\n{\n\n}",
1453 "isOptional" : false
1456 "name" : "rowIndex",
1459 "isOptional" : false
1463 "type" : "Roo.EventObject",
1465 "isOptional" : false
1472 "type" : "function",
1473 "desc" : "The raw click event for the entire grid.",
1474 "sig" : "function (e)\n{\n\n}",
1483 "type" : "Roo.EventObject",
1485 "isOptional" : false
1491 "name" : "rowdblclick",
1492 "type" : "function",
1493 "desc" : "Fires when a row is double clicked",
1494 "sig" : "function (_self, rowIndex, e)\n{\n\n}",
1505 "isOptional" : false
1508 "name" : "rowIndex",
1511 "isOptional" : false
1515 "type" : "Roo.EventObject",
1517 "isOptional" : false
1523 "name" : "startdrag",
1524 "type" : "function",
1525 "desc" : "Fires when row(s) start being dragged",
1526 "sig" : "function (_self, dd, e)\n{\n\n}",
1537 "isOptional" : false
1541 "type" : "Roo.GridDD",
1542 "desc" : "The drag drop object",
1543 "isOptional" : false
1548 "desc" : "The raw browser event",
1549 "isOptional" : false
1555 "name" : "dblclick",
1556 "type" : "function",
1557 "desc" : "The raw dblclick event for the entire grid.",
1558 "sig" : "function (e)\n{\n\n}",
1567 "type" : "Roo.EventObject",
1569 "isOptional" : false
1575 "name" : "cellcontextmenu",
1576 "type" : "function",
1577 "desc" : "Fires when a cell is right clicked",
1578 "sig" : "function (_self, rowIndex, cellIndex, e)\n{\n\n}",
1589 "isOptional" : false
1592 "name" : "rowIndex",
1595 "isOptional" : false
1598 "name" : "cellIndex",
1601 "isOptional" : false
1605 "type" : "Roo.EventObject",
1607 "isOptional" : false
1613 "name" : "contextmenu",
1614 "type" : "function",
1615 "desc" : "The raw contextmenu event for the entire grid.",
1616 "sig" : "function (e)\n{\n\n}",
1625 "type" : "Roo.EventObject",
1627 "isOptional" : false
1633 "name" : "celldblclick",
1634 "type" : "function",
1635 "desc" : "Fires when a cell is double clicked",
1636 "sig" : "function (_self, rowIndex, columnIndex, e)\n{\n\n}",
1647 "isOptional" : false
1650 "name" : "rowIndex",
1653 "isOptional" : false
1656 "name" : "columnIndex",
1659 "isOptional" : false
1663 "type" : "Roo.EventObject",
1665 "isOptional" : false