blob: 8b4f8fcd87597d10aebd0d994f7d5b8367cd81c3 [file] [log] [blame]
{ "type": "class",
"qname": "mx.controls.DataGrid",
"baseClassname": "mx.controls.listClasses.DataGridListBase"
,
"description": "The <code>DataGrid</code> control is like a List except that it can show more than one column of data making it suited for showing objects with multiple properties. <p> The DataGrid control provides the following features: <ul> <li>Columns of different widths or identical fixed widths</li> <li>Columns that the user can resize at runtime </li> <li>Columns that the user can reorder at runtime </li> <li>Optional customizable column headers</li> <li>Ability to use a custom item renderer for any column to display data other than text</li> <li>Support for sorting the data by clicking on a column</li> </ul> </p> The DataGrid control is intended for viewing data, and not as a layout tool like an HTML table. The mx.containers package provides those layout tools. <p>The DataGrid control has the following default sizing characteristics:</p> <table class=&quot;innertable&quot;> <tr> <th>Characteristic</th> <th>Description</th> </tr> <tr> <td>Default size</td> <td>If the columns are empty, the default width is 300 pixels. If the columns contain information but define no explicit widths, the default width is 100 pixels per column. The DataGrid width is sized to fit the width of all columns, if possible. The default number of displayed rows, including the header is 7, and each row, by default, is 20 pixels high. </td> </tr> <tr> <td>Minimum size</td> <td>0 pixels.</td> </tr> <tr> <td>Maximum size</td> <td>5000 by 5000.</td> </tr> </table> <p> The <code>&lt;mx:DataGrid&gt;</code> tag inherits all of the tag attributes of its superclass, except for <code>labelField</code>, <code>iconField</code>, and <code>iconFunction</code>, and adds the following tag attributes: </p> <pre>\\n &lt;mx:DataGrid\\n <b>Properties</b>\\n columns=&quot;<i>From dataProvider</i>&quot;\\n draggableColumns=&quot;true|false&quot;\\n editable=&quot;false|true&quot;\\n editedItemPosition=&quot;<code>null</code>&quot;\\n horizontalScrollPosition=&quot;null&quot;\\n imeMode=&quot;null&quot;\\n itemEditorInstance=&quot;null&quot;\\n minColumnWidth=&quot;<code>NaN</code>&quot;\\n resizableColumns=&quot;true|false&quot;\\n sortableColumns=&quot;true|false&quot;\\n \\n <b>Styles</b>\\n backgroundDisabledColor=&quot;0xEFEEEF&quot;\\n columnDropIndicatorSkin=&quot;DataGridColumnDropIndicator&quot;\\n columnResizeSkin=&quot;DataGridColumnResizeSkin&quot;\\n disabledIconColor=&quot;0x999999&quot;\\n headerColors=&quot;[#FFFFFF, #E6E6E6]&quot;\\n headerDragProxyStyleName=&quot;headerDragProxyStyle&quot;\\n headerSeparatorSkin=&quot;DataGridHeaderSeparator&quot;\\n headerStyleName=&quot;dataGridStyles&quot;\\n horizontalGridLineColor=&quot;0xF7F7F7&quot;\\n horizontalGridLines=&quot;false|true&quot;\\n horizontalLockedSeparatorSkin=&quot;undefined&quot;\\n horizontalSeparatorSkin=&quot;undefined&quot;\\n iconColor=&quot;0x111111&quot;\\n rollOverColor=&quot;0xB2E1FF&quot;\\n selectionColor=&quot;0x7FCEFF&quot;\\n sortArrowSkin=&quot;DataGridSortArrow&quot;\\n stretchCursor=&quot;<i>&quot;cursorStretch&quot; symbol from the Assets.swf file</i>&quot;\\n verticalGridLineColor=&quot;0xCCCCCC&quot;\\n verticalGridLines=&quot;false|true&quot;\\n verticalLockedSeparatorSkin=&quot;undefined&quot;\\n verticalSeparatorSkin=&quot;undefined&quot;\\n \\n <b>Events</b>\\n columnStretch=&quot;<i>No default</i>&quot;\\n headerRelease=&quot;<i>No default</i>&quot;\\n headerShift=&quot;<i>No default</i>&quot;\\n itemEditBegin=&quot;<i>No default</i>&quot;\\n itemEditBeginning=&quot;<i>No default</i>&quot;\\n itemEditEnd=&quot;<i>No default</i>&quot;\\n itemFocusIn=&quot;<i>No default</i>&quot;\\n itemFocusOut=&quot;<i>No default</i>&quot;\\n /&gt;\\n \\n <b>The following DataGrid code sample specifies the column order:</b>\\n &lt;mx:DataGrid&gt;\\n &lt;mx:dataProvider&gt;\\n &lt;mx:Object Artist=&quot;Pavement&quot; Price=&quot;11.99&quot;\\n Album=&quot;Slanted and Enchanted&quot;/&gt;\\n &lt;mx:Object Artist=&quot;Pavement&quot;\\n Album=&quot;Brighten the Corners&quot; Price=&quot;11.99&quot;/&gt;\\n &lt;/mx:dataProvider&gt;\\n &lt;mx:columns&gt;\\n &lt;mx:DataGridColumn dataField=&quot;Album&quot;/&gt;\\n &lt;mx:DataGridColumn dataField=&quot;Price&quot;/&gt;\\n &lt;/mx:columns&gt;\\n &lt;/mx:DataGrid&gt;\\n </pre> </p>",
"tags": [
{ "tagName": "includeExample",
"values": ["examples/SimpleDataGrid.mxml"]},
{ "tagName": "see",
"values": ["mx.controls.dataGridClasses.DataGridItemRenderer", "mx.controls.dataGridClasses.DataGridColumn", "mx.controls.dataGridClasses.DataGridDragProxy", "mx.events.DataGridEvent"]},
{ "tagName": "mxml",
"values": []},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"members": [
{ "type": "method",
"qname": "mx.controls.DataGrid",
"namespace": "",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Constructor.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "",
"params": []}
,
{ "type": "accessor",
"access": "read-write",
"return": "Array",
"qname": "columns",
"namespace": "public",
"bindable": ["columnsChanged"],
"details": [],
"deprecated": {},
"description": "An array of DataGridColumn objects, one for each column that can be displayed. If not explicitly set, the DataGrid control attempts to examine the first data provider item to determine the set of properties and display those properties in alphabetic order. <p>If you want to change the set of columns, you must get this array, make modifications to the columns and order of columns in the array, and then assign the new array to the columns property. This is because the DataGrid control returned a new copy of the array of columns and therefore did not notice the changes.</p>",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "org.apache.royale.core.IBead",
"qname": "presentationModel",
"namespace": "public",
"bindable": [],
"details": ["override"],
"deprecated": {},
"description": "The DataGrid's presentation model",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10.2", "AIR 2.6"]},
{ "tagName": "productversion",
"values": ["Royale 0.9"]},
{ "tagName": "royaleignorecoercion",
"values": ["org.apache.royale.core.IDataGridPresentationModel", "org.apache.royale.core.IBead"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "method",
"qname": "addedToParent",
"namespace": "public",
"bindable": [],
"details": ["override"],
"deprecated": {},
"return": "void",
"params": []}
]
}