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.",
32 "name" : "autoSizeColumns",
34 "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.",
35 "memberOf" : "Roo.grid.Grid",
41 "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>",
42 "memberOf" : "Roo.util.Observable",
46 "name" : "maxRowsToMeasure",
48 "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).",
49 "memberOf" : "Roo.grid.Grid",
53 "name" : "minColumnWidth",
55 "desc" : "The minimum width a column can be resized to. Default is 25.",
56 "memberOf" : "Roo.grid.Grid",
62 "desc" : "Configures the text is the drag proxy (defaults to \"%0 selected row(s)\").\n%0 is replaced with the number of selected rows.",
63 "memberOf" : "Roo.grid.Grid",
67 "name" : "autoExpandColumn",
69 "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.",
70 "memberOf" : "Roo.grid.Grid",
74 "name" : "autoExpandMax",
76 "desc" : "The maximum width the autoExpandColumn can have (if enabled). Default is 1000.",
77 "memberOf" : "Roo.grid.Grid",
81 "name" : "enableRowHeightSync",
83 "desc" : "True to manually sync row heights across locked and not locked rows. Default is false.",
84 "memberOf" : "Roo.grid.Grid",
88 "name" : "enableDrop",
90 "desc" : "True to enable drop of elements. Default is false. (double check if this is needed?)",
91 "memberOf" : "Roo.grid.Grid",
95 "name" : "monitorWindowResize",
97 "desc" : "True to autoSize the grid when the window resizes. Default is true.",
98 "memberOf" : "Roo.grid.Grid",
102 "name" : "autoExpandMin",
104 "desc" : "The minimum width the autoExpandColumn can have (if enabled).\nDefault is 50.",
105 "memberOf" : "Roo.grid.Grid",
111 "desc" : "The {@link Roo.grid.GridView} used by the grid. This can be set before a call to render().",
112 "memberOf" : "Roo.grid.Grid",
116 "name" : "enableDrag",
118 "desc" : "True to enable drag of rows. Default is false. (double check if this is needed?)",
119 "memberOf" : "Roo.grid.Grid",
125 "desc" : "- drag drop group.",
126 "memberOf" : "Roo.grid.Grid",
130 "name" : "autoWidth",
132 "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.",
133 "memberOf" : "Roo.grid.Grid",
137 "name" : "maxHeight",
139 "desc" : "Sets the maximum height of the grid - ignored if autoHeight is not on.",
140 "memberOf" : "Roo.grid.Grid",
144 "name" : "trackMouseOver",
146 "desc" : "True to highlight rows when the mouse is over. Default is true.",
147 "memberOf" : "Roo.grid.Grid",
153 "desc" : "An {@link Roo.LoadMask} config or true to mask the grid while loading. Default is false.",
154 "memberOf" : "Roo.grid.Grid",
158 "name" : "stripeRows",
160 "desc" : "True to stripe the rows. Default is true.",
161 "memberOf" : "Roo.grid.Grid",
165 "name" : "enableColumnMove",
167 "desc" : "True to enable drag and drop reorder of columns. Default is true.",
168 "memberOf" : "Roo.grid.Grid",
172 "name" : "enableColumnHide",
174 "desc" : "True to enable hiding of columns with the header context menu. Default is true.",
175 "memberOf" : "Roo.grid.Grid",
179 "name" : "autoSizeHeaders",
181 "desc" : "True to measure headers with column data when auto sizing columns. Default is true.",
182 "memberOf" : "Roo.grid.Grid",
186 "name" : "enableDragDrop",
188 "desc" : "True to enable drag and drop of rows. Default is false.",
189 "memberOf" : "Roo.grid.Grid",
193 "name" : "dropTarget",
194 "type" : "Roo.dd.DropTarget",
195 "desc" : "An {@link Roo.dd.DropTarget} config",
196 "memberOf" : "Roo.grid.Grid",
200 "name" : "dragGroup",
202 "desc" : "- drag group (?? not sure if needed.)",
203 "memberOf" : "Roo.grid.Grid",
207 "name" : "autoHeight",
209 "desc" : "True to fit the height of the grid container to the height of the data. Default is false.",
210 "memberOf" : "Roo.grid.Grid",
216 "name" : "getSelectionModel",
217 "desc" : "Returns the grid's SelectionModel.",
219 "isConstructor" : false,
221 "memberOf" : "Roo.grid.Grid",
230 "type" : "SelectionModel",
237 "desc" : "Destroy this grid.",
239 "isConstructor" : false,
241 "memberOf" : "Roo.grid.Grid",
250 "desc" : "True to remove the element",
257 "name" : "getColumnModel",
258 "desc" : "Returns the grid's ColumnModel.",
260 "isConstructor" : false,
262 "memberOf" : "Roo.grid.Grid",
271 "type" : "ColumnModel",
277 "name" : "getGridEl",
278 "desc" : "Returns the grid's underlying element.",
280 "isConstructor" : false,
282 "memberOf" : "Roo.grid.Grid",
292 "desc" : "The element"
297 "name" : "getDataSource",
298 "desc" : "Returns the grid's DataSource.",
300 "isConstructor" : false,
302 "memberOf" : "Roo.grid.Grid",
311 "type" : "DataSource",
318 "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.",
320 "isConstructor" : false,
322 "memberOf" : "Roo.grid.Grid",
332 "desc" : "Returns the grid's GridView object.",
334 "isConstructor" : false,
336 "memberOf" : "Roo.grid.Grid",
351 "name" : "getDragDropText",
352 "desc" : "Called to get grid's drag proxy text, by default returns this.ddText.\nOverride this to put something different in the dragged text.",
354 "isConstructor" : false,
356 "memberOf" : "Roo.grid.Grid",
371 "name" : "reconfigure",
372 "desc" : "Reconfigures the grid to use a different Store and Column Model.\nThe View will be bound to the new objects and refreshed.",
374 "isConstructor" : false,
376 "memberOf" : "Roo.grid.Grid",
383 "name" : "dataSource",
384 "type" : "Roo.data.Store",
385 "desc" : "The new {@link Roo.data.Store} object",
390 "type" : "Roo.grid.ColumnModel",
391 "desc" : "new {@link Roo.grid.ColumnModel} object",
398 "name" : "addColumns",
399 "desc" : "addColumns\nAdd's a column, default at the end..",
401 "isConstructor" : false,
403 "memberOf" : "Roo.grid.Grid",
412 "desc" : "to add (default end)",
418 "desc" : "objects of column configuration see {@link Roo.grid.ColumnModel}",
426 "desc" : "Called once after all setup has been completed and the grid is ready to be rendered.",
428 "isConstructor" : false,
430 "memberOf" : "Roo.grid.Grid",
439 "type" : "Roo.grid.Grid",
445 "name" : "purgeListeners",
446 "desc" : "Removes all listeners for this object",
448 "isConstructor" : false,
450 "memberOf" : "Roo.util.Observable",
460 "desc" : "Appends an event handler to this element (shorthand for addListener)",
462 "isConstructor" : false,
464 "memberOf" : "Roo.util.Observable",
471 "name" : "eventName",
473 "desc" : "The type of event to listen for",
479 "desc" : "The method the event invokes",
485 "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
491 "desc" : "(optional)",
499 "desc" : "Removes a listener (shorthand for removeListener)",
501 "isConstructor" : false,
503 "memberOf" : "Roo.util.Observable",
510 "name" : "eventName",
512 "desc" : "The type of event to listen for",
518 "desc" : "The handler to remove",
524 "desc" : "(optional) The scope (this object) for the handler",
531 "name" : "addEvents",
532 "desc" : "Used to define events on this Observable",
534 "isConstructor" : false,
536 "memberOf" : "Roo.util.Observable",
545 "desc" : "The object with the events defined",
552 "name" : "releaseCapture",
553 "desc" : "Removes <b>all</b> added captures from the Observable.",
555 "isConstructor" : false,
557 "memberOf" : "Roo.util.Observable",
565 "type" : "Observable",
566 "desc" : "The Observable to release",
573 "name" : "removeListener",
574 "desc" : "Removes a listener",
576 "isConstructor" : false,
578 "memberOf" : "Roo.util.Observable",
585 "name" : "eventName",
587 "desc" : "The type of event to listen for",
593 "desc" : "The handler to remove",
599 "desc" : "(optional) The scope (this object) for the handler",
606 "name" : "fireEvent",
607 "desc" : "Fires the specified event with the passed parameters (minus the event name).",
609 "isConstructor" : false,
611 "memberOf" : "Roo.util.Observable",
618 "name" : "eventName",
625 "type" : "Object...",
626 "desc" : "Variable number of parameters are passed to handlers",
634 "desc" : "returns false if any of the handlers return false otherwise it returns true"
639 "name" : "hasListener",
640 "desc" : "Checks to see if this object has any listeners for a specified event",
642 "isConstructor" : false,
644 "memberOf" : "Roo.util.Observable",
651 "name" : "eventName",
653 "desc" : "The name of the event to check for",
661 "desc" : "True if the event is being listened for, else false"
667 "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.",
669 "isConstructor" : false,
671 "memberOf" : "Roo.util.Observable",
679 "type" : "Observable",
680 "desc" : "The Observable to capture",
686 "desc" : "The function to call",
692 "desc" : "(optional) The scope (this object) for the fn",
699 "name" : "addListener",
700 "desc" : "Appends an event handler to this component",
702 "isConstructor" : false,
704 "memberOf" : "Roo.util.Observable",
711 "name" : "eventName",
713 "desc" : "The type of event to listen for",
719 "desc" : "The method the event invokes",
725 "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
731 "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>",
740 "name" : "rowcontextmenu",
741 "desc" : "Fires when a row is right clicked",
742 "memberOf" : "Roo.grid.Grid",
762 "type" : "Roo.EventObject",
770 "name" : "columnmove",
771 "desc" : "Fires when the user moves a column",
772 "memberOf" : "Roo.grid.Grid",
794 "name" : "headercontextmenu",
795 "desc" : "Fires when a header is right clicked",
796 "memberOf" : "Roo.grid.Grid",
809 "name" : "columnIndex",
816 "type" : "Roo.EventObject",
825 "desc" : "Fires when the grid is rendered",
826 "memberOf" : "Roo.grid.Grid",
842 "name" : "bodyscroll",
843 "desc" : "Fires when the body element is scrolled",
844 "memberOf" : "Roo.grid.Grid",
851 "name" : "scrollLeft",
857 "name" : "scrollTop",
866 "name" : "columnresize",
867 "desc" : "Fires when the user resizes a column",
868 "memberOf" : "Roo.grid.Grid",
875 "name" : "columnIndex",
891 "desc" : "Fires when a drag operation is complete",
892 "memberOf" : "Roo.grid.Grid",
906 "type" : "Roo.GridDD",
907 "desc" : "The drag drop object",
913 "desc" : "The raw browser event",
921 "desc" : "The raw mouseout event for the entire grid.",
922 "memberOf" : "Roo.grid.Grid",
930 "type" : "Roo.EventObject",
938 "name" : "cellclick",
939 "desc" : "Fires when a cell is clicked",
940 "memberOf" : "Roo.grid.Grid",
959 "name" : "columnIndex",
966 "type" : "Roo.EventObject",
975 "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.",
976 "memberOf" : "Roo.grid.Grid",
990 "type" : "Roo.GridDD",
991 "desc" : "The drag drop object",
997 "desc" : "The target drag drop object",
1003 "desc" : "The raw browser event",
1004 "isOptional" : false
1010 "name" : "rowclass",
1011 "desc" : "Fires when a row is rendered, so you can change add a style to it.",
1012 "memberOf" : "Roo.grid.Grid",
1019 "name" : "gridview",
1020 "type" : "GridView",
1021 "desc" : "The grid view",
1022 "isOptional" : false
1027 "desc" : "contains record rowIndex and rowClass - set rowClass to add a style.",
1028 "isOptional" : false
1035 "desc" : "The raw keydown event for the entire grid.",
1036 "memberOf" : "Roo.grid.Grid",
1044 "type" : "Roo.EventObject",
1046 "isOptional" : false
1052 "name" : "mousedown",
1053 "desc" : "The raw mousedown event for the entire grid.",
1054 "memberOf" : "Roo.grid.Grid",
1062 "type" : "Roo.EventObject",
1064 "isOptional" : false
1070 "name" : "dragenter",
1071 "desc" : "Fires when the dragged row(s) first cross another DD target while being dragged",
1072 "memberOf" : "Roo.grid.Grid",
1082 "isOptional" : false
1086 "type" : "Roo.GridDD",
1087 "desc" : "The drag drop object",
1088 "isOptional" : false
1091 "name" : "targetId",
1093 "desc" : "The target drag drop object",
1094 "isOptional" : false
1099 "desc" : "The raw browser event",
1100 "isOptional" : false
1107 "desc" : "Fires when the dragged row(s) leave another DD target while being dragged",
1108 "memberOf" : "Roo.grid.Grid",
1118 "isOptional" : false
1122 "type" : "Roo.GridDD",
1123 "desc" : "The drag drop object",
1124 "isOptional" : false
1127 "name" : "targetId",
1129 "desc" : "The target drag drop object",
1130 "isOptional" : false
1135 "desc" : "The raw browser event",
1136 "isOptional" : false
1143 "desc" : "The raw mouseup event for the entire grid.",
1144 "memberOf" : "Roo.grid.Grid",
1152 "type" : "Roo.EventObject",
1154 "isOptional" : false
1160 "name" : "keypress",
1161 "desc" : "The raw keypress event for the entire grid.",
1162 "memberOf" : "Roo.grid.Grid",
1170 "type" : "Roo.EventObject",
1172 "isOptional" : false
1178 "name" : "headerclick",
1179 "desc" : "Fires when a header is clicked",
1180 "memberOf" : "Roo.grid.Grid",
1190 "isOptional" : false
1193 "name" : "columnIndex",
1196 "isOptional" : false
1200 "type" : "Roo.EventObject",
1202 "isOptional" : false
1208 "name" : "mouseover",
1209 "desc" : "The raw mouseover event for the entire grid.",
1210 "memberOf" : "Roo.grid.Grid",
1218 "type" : "Roo.EventObject",
1220 "isOptional" : false
1226 "name" : "headerdblclick",
1227 "desc" : "Fires when a header cell is double clicked",
1228 "memberOf" : "Roo.grid.Grid",
1238 "isOptional" : false
1241 "name" : "columnIndex",
1244 "isOptional" : false
1248 "type" : "Roo.EventObject",
1250 "isOptional" : false
1256 "name" : "dragdrop",
1257 "desc" : "Fires when dragged row(s) are dropped on a valid DD target",
1258 "memberOf" : "Roo.grid.Grid",
1268 "isOptional" : false
1272 "type" : "Roo.GridDD",
1273 "desc" : "The drag drop object",
1274 "isOptional" : false
1277 "name" : "targetId",
1279 "desc" : "The target drag drop object",
1280 "isOptional" : false
1285 "desc" : "The raw browser event",
1286 "isOptional" : false
1292 "name" : "rowclick",
1293 "desc" : "Fires when a row is clicked",
1294 "memberOf" : "Roo.grid.Grid",
1304 "isOptional" : false
1307 "name" : "rowIndex",
1310 "isOptional" : false
1314 "type" : "Roo.EventObject",
1316 "isOptional" : false
1323 "desc" : "The raw click event for the entire grid.",
1324 "memberOf" : "Roo.grid.Grid",
1332 "type" : "Roo.EventObject",
1334 "isOptional" : false
1340 "name" : "rowdblclick",
1341 "desc" : "Fires when a row is double clicked",
1342 "memberOf" : "Roo.grid.Grid",
1352 "isOptional" : false
1355 "name" : "rowIndex",
1358 "isOptional" : false
1362 "type" : "Roo.EventObject",
1364 "isOptional" : false
1370 "name" : "startdrag",
1371 "desc" : "Fires when row(s) start being dragged",
1372 "memberOf" : "Roo.grid.Grid",
1382 "isOptional" : false
1386 "type" : "Roo.GridDD",
1387 "desc" : "The drag drop object",
1388 "isOptional" : false
1393 "desc" : "The raw browser event",
1394 "isOptional" : false
1400 "name" : "dblclick",
1401 "desc" : "The raw dblclick event for the entire grid.",
1402 "memberOf" : "Roo.grid.Grid",
1410 "type" : "Roo.EventObject",
1412 "isOptional" : false
1418 "name" : "cellcontextmenu",
1419 "desc" : "Fires when a cell is right clicked",
1420 "memberOf" : "Roo.grid.Grid",
1430 "isOptional" : false
1433 "name" : "rowIndex",
1436 "isOptional" : false
1439 "name" : "cellIndex",
1442 "isOptional" : false
1446 "type" : "Roo.EventObject",
1448 "isOptional" : false
1454 "name" : "contextmenu",
1455 "desc" : "The raw contextmenu event for the entire grid.",
1456 "memberOf" : "Roo.grid.Grid",
1464 "type" : "Roo.EventObject",
1466 "isOptional" : false
1472 "name" : "celldblclick",
1473 "desc" : "Fires when a cell is double clicked",
1474 "memberOf" : "Roo.grid.Grid",
1484 "isOptional" : false
1487 "name" : "rowIndex",
1490 "isOptional" : false
1493 "name" : "columnIndex",
1496 "isOptional" : false
1500 "type" : "Roo.EventObject",
1502 "isOptional" : false