| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!-- saved from url=(0014)about:internet --><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" href="../../../style.css" type="text/css" media="screen"><link rel="stylesheet" href="../../../print.css" type="text/css" media="print"><link rel="stylesheet" href="../../../override.css" type="text/css"><meta name="keywords" content="GridColumn,spark.components.gridClasses.GridColumn,CELL,DOUBLE_CLICK,ERROR_TEXT,GRID,MULTIPLE_CELLS,MULTIPLE_ROWS,NONE,NONE,ROW,SINGLE_CELL,SINGLE_CLICK,SINGLE_CLICK_ON_SELECTED_CELL,SINGLE_ROW,column,column,column,column,columnCount,columnIndex,columnIndex,columnIndex,columnIndex,columnIndex,columnIndex,columnIndex,column,comboBox,data,data,dataField,dataGrid,dataGrid,dataGrid,dataGrid,dataProvider,dataTipField,dataTipFormatter,dataTipFunction,down,down,dragging,dragging,editable,editedItemPosition,editedItemRenderer,editorActivationMouseEvent,editorColumnIndex,editorRowIndex,enableIME,formatter,grid,grid,grid,grid,gridColumnHeaderGroup,gridHeaderViewLayout,gridViewLayout,headerRenderer,headerText,hovered,hovered,imeMode,imeMode,itemEditor,itemEditorInstance,itemRenderer,itemRenderer,itemRendererFunction,label,label,labelDisplay,labelFunction,maxWidth,minWidth,percentWidth,rendererIsEditable,resizable,rowCount,rowIndex,rowIndex,rowIndex,rowIndex,rowIndex,rowIndex,selected,selected,showDataTips,showsCaret,showsCaret,sortCompareFunction,sortCompareType,sortDescending,sortField,sortable,textArea,value,visible,width,cancel,cancel,containsGlobalPoint,containsMouseEvent,containsMouseEvent,discard,discard,discard,discard,endItemEditorSession,getCurrentRendererState,getNextVisibleColumnIndex,getPreviousVisibleColumnIndex,getSortFieldValue,grid_gridMouseWheelHandler,initialize,itemToDataTip,itemToLabel,itemToRenderer,prepare,prepare,prepare,prepare,prepareGridVisualElement,save,save,startItemEditorSession,uninitialize,validate"><title>spark.components.gridClasses.GridColumn</title><script src="../../../AC_OETags.js" type="text/javascript"></script></head><body><script language="javascript" type="text/javascript" src="../../../asdoc.js"></script><script language="javascript" type="text/javascript" src="../../../help.js"></script><script language="javascript" type="text/javascript" src="../../../cookies.js"></script><script language="javascript" type="text/javascript"><!-- |
| asdocTitle = 'GridColumn - ApacheFlex API Reference'; |
| var baseRef = '../../../'; |
| window.onload = configPage; |
| --></script> |
| <script type="text/javascript"> |
| scrollToNameAnchor(); |
| </script><table class="titleTable" cellpadding="0" cellspacing="0" id="titleTable" style="display:none"><tr><td class="titleTableTitle" align="left">Apache Flex 4.16.1 API Reference </td><td class="titleTableTopNav" align="right"><a href="../../../package-summary.html" onclick="loadClassListFrame('../../../all-classes.html')">All Packages</a> | <a href="../../../class-summary.html" onclick="loadClassListFrame('../../../all-classes.html')">All Classes</a> | <a href="../../../all-index-A.html" onclick="loadClassListFrame('../../../index-list.html')">Index</a> | <a id="framesLink1" href="../../../index.html?spark/components/gridClasses/GridColumn.html&spark/components/gridClasses/class-list.html">Frames</a><a id="noFramesLink1" style="display:none" href="" onclick="parent.location=document.location"> No Frames </a></td><td class="titleTableLogo" align="right" rowspan="3"><img src="../../../images/logo.jpg" class="logoImage" alt="AdobeLogo" title="AdobeLogo"></td></tr><tr class="titleTableRow2"><td class="titleTableSubTitle" id="subTitle" align="left">GridColumn</td><td class="titleTableSubNav" id="subNav" align="right"><a href="#propertySummary">Properties</a> | <a href="#methodSummary">Methods</a> | <a href="#constantSummary">Constants</a> | <a href="#includeExamplesSummary">Examples</a></td></tr><tr class="titleTableRow3"><td colspan="3"> </td></tr></table><script language="javascript" type="text/javascript" xml:space="preserve"> |
| <!-- |
| |
| if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("GridColumn"); titleBar_setSubNav(true,true,false,false,false,false,false,false,true,true,false ,false,false,false,false,false);} |
| --> |
| </script><div xmlns:fn="http://www.w3.org/2005/xpath-functions" class="MainContent"><table class="classHeaderTable" cellpadding="0" cellspacing="0"><tr><td class="classHeaderTableLabel">Package</td><td><a href="package-detail.html" onclick="javascript:loadClassListFrame('class-list.html')">spark.components.gridClasses</a></td></tr><tr><td class="classHeaderTableLabel">Class</td><td class="classSignature">public class GridColumn</td></tr><tr><td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">GridColumn <img src="../../../images/inherit-arrow.gif" title="Inheritance" alt="Inheritance" class="inheritArrow"> flash.events.EventDispatcher</td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4.5</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 10, AIR 2.5</td></tr></table><p></p><p></p><p></p><p></p> |
| The GridColumn class defines a column of a Spark grid control, |
| such as the Spark DataGrid or Grid control. |
| Each data provider item for the control corresponds to one row of the grid. |
| The GridColumn class specifies the field of the data provider item |
| whose value is to be displayed in the column. |
| It also specifies the item renderer used to display that value, the item editor |
| used to change the value, and other properties of the column. |
| <p></p><a name="mxmlSyntaxSummary"></a><span class="classHeaderTableLabel">MXML Syntax</span><span id="showMxmlLink" style="display:none"><a href="#mxmlSyntaxSummary" onclick="toggleMXMLOnly();"><img src="../../../images/collapsed.gif" title="collapsed" alt="collapsed" class="collapsedImage">Show MXML Syntax</a><br/></span><span id="hideMxmlLink"><a href="#mxmlSyntaxSummary" onclick="toggleMXMLOnly();"><img src="../../../images/expanded.gif" title="expanded" alt="expanded" class="expandedImage">Hide MXML Syntax</a></span><div id="mxmlSyntax" class="mxmlSyntax"><p>The <code><s:GridColumn></code> tag inherits all of the tag |
| attributes of its superclass and adds the following tag attributes:</p> |
| <pre> |
| <s:GridColumn |
| <strong>Properties</strong> |
| dataField="null" |
| dataTipField="null" |
| dataTipFormatter="null" |
| dataTipFunction="null" |
| editable="true" |
| formatter="null" |
| headerRenderer="null" |
| headerText="<i>value of dataField</i>" |
| imeMode="null" |
| itemEditor="null" |
| itemRenderer="null" |
| itemRendererFunction="null" |
| labelFunction="null" |
| maxWidth="NaN" |
| minWidth="20" |
| rendererIsEditable="false" |
| resizeable="true" |
| showDataTips="undefined" |
| sortable="true" |
| sortCompareFunction="null" |
| sortDescending="false" |
| visible="true" |
| width="NaN" |
| /> |
| </pre> |
| |
| </div><script language="javascript" type="text/javascript"><!-- |
| setMXMLOnly(); |
| --></script><p><a href="#includeExamplesSummary">View the examples</a></p><p><span class="classHeaderTableLabel">See also</span></p><div class="seeAlso"><a href="../../../spark/components/Grid.html" target="">spark.components.Grid</a><br/><a href="../../../spark/components/DataGrid.html" target="">spark.components.DataGrid</a></div><br/><hr></div><a name="propertySummary"></a><div class="summarySection"><div class="summaryTableTitle">Public Properties</div><table cellspacing="0" cellpadding="3" class="summaryTable " id="summaryTableProperty"><tr><th> </th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined By</th></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#columnIndex" class="signatureLink">columnIndex</a> : int<div class="summaryTableDescription">[read-only] |
| The position of this column in the grid's column list, |
| or -1 if this column's grid is null.</div></td><td class="summaryTableOwnerCol">GridColumn</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#dataField" class="signatureLink">dataField</a> : String<div class="summaryTableDescription"> |
| The name of the field or property in the data provider item associated |
| with the column.</div></td><td class="summaryTableOwnerCol">GridColumn</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#dataTipField" class="signatureLink">dataTipField</a> : String<div class="summaryTableDescription"> |
| The name of the field in the data provider to display as the datatip.</div></td><td class="summaryTableOwnerCol">GridColumn</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#dataTipFormatter" class="signatureLink">dataTipFormatter</a> : <a href="../../../mx/formatters/IFormatter.html">IFormatter</a><div class="summaryTableDescription"> |
| Specifies the formatter used by the column's itemToDataTip() method to |
| convert data provider items to Strings.</div></td><td class="summaryTableOwnerCol">GridColumn</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#dataTipFunction" class="signatureLink">dataTipFunction</a> : Function<div class="summaryTableDescription"> |
| Specifies a callback function to run on each item of the data provider |
| to determine its data tip.</div></td><td class="summaryTableOwnerCol">GridColumn</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#editable" class="signatureLink">editable</a> : Boolean<div class="summaryTableDescription"> |
| Indicates whether the items in the column are editable.</div></td><td class="summaryTableOwnerCol">GridColumn</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#editorActivationMouseEvent" class="signatureLink">editorActivationMouseEvent</a> : String<div class="summaryTableDescription"> |
| The type of mouse event that starts an editor session.</div></td><td class="summaryTableOwnerCol">GridColumn</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#formatter" class="signatureLink">formatter</a> : <a href="../../../mx/formatters/IFormatter.html">IFormatter</a><div class="summaryTableDescription"> |
| Specifies the formatter used by the column's itemToLabel() method to |
| convert data provider items to strings.</div></td><td class="summaryTableOwnerCol">GridColumn</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#grid" class="signatureLink">grid</a> : <a href="../../../spark/components/Grid.html">Grid</a><div class="summaryTableDescription">[read-only] |
| The Grid object associated with this column.</div></td><td class="summaryTableOwnerCol">GridColumn</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#headerRenderer" class="signatureLink">headerRenderer</a> : <a href="../../../mx/core/IFactory.html">IFactory</a><div class="summaryTableDescription"> |
| The class factory for the IGridItemRenderer class used as |
| the header for this column.</div></td><td class="summaryTableOwnerCol">GridColumn</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#headerText" class="signatureLink">headerText</a> : String<div class="summaryTableDescription"> |
| Text for the header of this column.</div></td><td class="summaryTableOwnerCol">GridColumn</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#imeMode" class="signatureLink">imeMode</a> : String<div class="summaryTableDescription"> |
| Specifies the IME (Input Method Editor) mode.</div></td><td class="summaryTableOwnerCol">GridColumn</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#itemEditor" class="signatureLink">itemEditor</a> : <a href="../../../mx/core/IFactory.html">IFactory</a><div class="summaryTableDescription"> |
| A class factory for IGridItemEditor class used to edit individual |
| grid cells in this column.</div></td><td class="summaryTableOwnerCol">GridColumn</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#itemRenderer" class="signatureLink">itemRenderer</a> : <a href="../../../mx/core/IFactory.html">IFactory</a><div class="summaryTableDescription"> |
| The class factory for the IGridItemRenderer class used to |
| render individual grid cells.</div></td><td class="summaryTableOwnerCol">GridColumn</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#itemRendererFunction" class="signatureLink">itemRendererFunction</a> : Function<div class="summaryTableDescription"> |
| If specified, the value of this property must be an idempotent function |
| that returns an item renderer IFactory based on its data provider item |
| and column parameters.</div></td><td class="summaryTableOwnerCol">GridColumn</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#labelFunction" class="signatureLink">labelFunction</a> : Function<div class="summaryTableDescription"> |
| An idempotent function that converts a data provider item into a column-specific string |
| that's used to initialize the item renderer's label property.</div></td><td class="summaryTableOwnerCol">GridColumn</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#maxWidth" class="signatureLink">maxWidth</a> : Number<div class="summaryTableDescription"> |
| The maximum width of this column in pixels.</div></td><td class="summaryTableOwnerCol">GridColumn</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#minWidth" class="signatureLink">minWidth</a> : Number<div class="summaryTableDescription"> |
| The minimum width of this column in pixels.</div></td><td class="summaryTableOwnerCol">GridColumn</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#percentWidth" class="signatureLink">percentWidth</a> : Number<div class="summaryTableDescription"> |
| The width of this column as a percentage of DataGrid width.</div></td><td class="summaryTableOwnerCol">GridColumn</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#rendererIsEditable" class="signatureLink">rendererIsEditable</a> : Boolean<div class="summaryTableDescription"> |
| Determines whether any of the item renderer's controls are editable.</div></td><td class="summaryTableOwnerCol">GridColumn</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#resizable" class="signatureLink">resizable</a> : Boolean<div class="summaryTableDescription"> |
| Indicates whether the user is allowed to resize |
| the width of the column.</div></td><td class="summaryTableOwnerCol">GridColumn</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#showDataTips" class="signatureLink">showDataTips</a> : *<div class="summaryTableDescription"> |
| Indicates whether the datatips are shown in the column.</div></td><td class="summaryTableOwnerCol">GridColumn</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#sortable" class="signatureLink">sortable</a> : Boolean<div class="summaryTableDescription"> |
| If true, and if the grid's data provider is an ICollectionView, |
| and if the associated grid's sortableColumns property is true, |
| then this column supports interactive sorting.</div></td><td class="summaryTableOwnerCol">GridColumn</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#sortCompareFunction" class="signatureLink">sortCompareFunction</a> : Function<div class="summaryTableDescription"> |
| The function that compares two elements during a sort of on the |
| data elements of this column.</div></td><td class="summaryTableOwnerCol">GridColumn</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#sortCompareType" class="signatureLink">sortCompareType</a> : String<div class="summaryTableDescription"> |
| The sortCompareType defines the valid constant values for the |
| sortCompareType property of the SortField and GridColumn.</div></td><td class="summaryTableOwnerCol">GridColumn</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#sortDescending" class="signatureLink">sortDescending</a> : Boolean<div class="summaryTableDescription"> |
| If true, this column is sorted in descending order.</div></td><td class="summaryTableOwnerCol">GridColumn</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#sortField" class="signatureLink">sortField</a> : <a href="../../../mx/collections/ISortField.html">ISortField</a><div class="summaryTableDescription">[read-only] |
| Returns a SortField that can be used to sort a collection by this |
| column's dataField.</div></td><td class="summaryTableOwnerCol">GridColumn</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#visible" class="signatureLink">visible</a> : Boolean<div class="summaryTableDescription"> |
| If true, then display this column.</div></td><td class="summaryTableOwnerCol">GridColumn</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#width" class="signatureLink">width</a> : Number<div class="summaryTableDescription"> |
| The width of this column in pixels.</div></td><td class="summaryTableOwnerCol">GridColumn</td></tr></table></div><a name="methodSummary"></a><div class="summarySection"><div class="summaryTableTitle">Public Methods </div><table cellspacing="0" cellpadding="3" class="summaryTable " id="summaryTableMethod"><tr><th> </th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined By</th></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#GridColumn()" class="signatureLink">GridColumn</a>(columnName:String = null)</div><div class="summaryTableDescription"> |
| Constructor.</div></td><td class="summaryTableOwnerCol">GridColumn</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#itemToDataTip()" class="signatureLink">itemToDataTip</a>(item:Object):String</div><div class="summaryTableDescription"> |
| Convert the specified data provider item to a column-specific datatip String.</div></td><td class="summaryTableOwnerCol">GridColumn</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#itemToLabel()" class="signatureLink">itemToLabel</a>(item:Object):String</div><div class="summaryTableDescription"> |
| Convert the specified data provider item to a column-specific String.</div></td><td class="summaryTableOwnerCol">GridColumn</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#itemToRenderer()" class="signatureLink">itemToRenderer</a>(item:Object):<a href="../../../mx/core/IFactory.html">IFactory</a></div><div class="summaryTableDescription"> |
| Convert the specified data provider item to a column-specific item renderer factory.</div></td><td class="summaryTableOwnerCol">GridColumn</td></tr></table></div><a name="constantSummary"></a><div class="summarySection"><div class="summaryTableTitle">Public Constants</div><table cellspacing="0" cellpadding="3" class="summaryTable " id="summaryTableConstant"><tr><th> </th><th colspan="2">Constant</th><th class="summaryTableOwnerCol">Defined By</th></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#ERROR_TEXT" class="signatureLink">ERROR_TEXT</a> : String = <div class="summaryTableDescription">[static] |
| The return value for the itemToLabel() or |
| itemToDataTip() method if resolving the corresponding |
| property name (path) fails.</div></td><td class="summaryTableOwnerCol">GridColumn</td></tr></table></div><script language="javascript" type="text/javascript"><!-- |
| showHideInherited(); |
| --></script><div class="MainContent"><div class="detailSectionHeader">Property Detail</div><a name="propertyDetail"></a><a name="columnIndex"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">columnIndex</td><td class="detailHeaderType">property</td></tr></table><div class="detailBody"><code>columnIndex:int</code> [read-only] <p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4.5</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 10, AIR 2.5</td></tr></table><p></p><p></p><p> |
| The position of this column in the grid's column list, |
| or -1 if this column's grid is null. |
| |
| </p><p>This property can be used as the source for data binding.</p><br/><span class="label"> Implementation </span><br/><code> public function get columnIndex():int</code><br/></div><a name="propertyDetail"></a><a name="dataField"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">dataField</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code>dataField:String</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4.5</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 10, AIR 2.5</td></tr></table><p></p><p></p><p> |
| The name of the field or property in the data provider item associated |
| with the column. |
| Each GridColumn requires this property or |
| the <code>labelFunction</code> property to be set |
| to calculate the displayable text for the item renderer. |
| If the <code>dataField</code> |
| and <code>labelFunction</code> properties are set, |
| the data is displayed using the <code>labelFunction</code> and sorted |
| using the <code>dataField</code>. |
| <p>This value of this property is not necessarily the String that |
| is displayed in the column header. This property is |
| used only to access the data in the data provider. |
| For more information, see the <code>headerText</code> property.</p> |
| |
| <p>If the column or its grid specifies a <code>labelFunction</code>, |
| then the dataField is not used.</p> |
| |
| </p><p> The default value is <code>null</code>.</p><p>This property can be used as the source for data binding.</p><br/><span class="label"> Implementation </span><br/><code> public function get dataField():String</code><br/><code> public function set dataField(value:String):void</code><br/><p><span class="label">See also</span></p><div class="seeAlso"><a href="GridColumn.html#itemToLabel" target="">itemToLabel</a><br/><a href="GridColumn.html#labelFunction" target="">labelFunction</a></div></div><a name="propertyDetail"></a><a name="dataTipField"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">dataTipField</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code>dataTipField:String</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4.5</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 10, AIR 2.5</td></tr></table><p></p><p></p><p> |
| The name of the field in the data provider to display as the datatip. |
| By default, if <code>showDataTips</code> is <code>true</code>, |
| the associated grid control looks for a property named |
| <code>label</code> on each data provider item and displays it. |
| However, if the data provider does not contain a <code>label</code> |
| property, you can set the <code>dataTipField</code> property to |
| specify a different property name. |
| For example, you could set the value to "FullName" when a user views a |
| set of people's names included from a database. |
| <p><code>GridColumn.dataTipField</code> takes precedence over this property.</p> |
| |
| <p>If this column or its grid specifies a value for the |
| <code>dataTipFunction</code> property, then the |
| <code>dataTipField</code> property is ignored.</p> |
| |
| </p><p> The default value is <code>null</code>.</p><p>This property can be used as the source for data binding.</p><br/><span class="label"> Implementation </span><br/><code> public function get dataTipField():String</code><br/><code> public function set dataTipField(value:String):void</code><br/><p><span class="label">See also</span></p><div class="seeAlso"><a href="GridColumn.html#dataTipFunction" target="">dataTipFunction</a><br/><a href="GridColumn.html#itemToDataTip" target="">itemToDataTip</a></div></div><a name="propertyDetail"></a><a name="dataTipFormatter"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">dataTipFormatter</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code>dataTipFormatter:<a href="../../../mx/formatters/IFormatter.html">IFormatter</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4.5</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 10, AIR 2.5</td></tr></table><p></p><p></p><p> |
| Specifies the formatter used by the column's <code>itemToDataTip()</code> method to |
| convert data provider items to Strings. |
| |
| <p>If the formatter's <code>styleParent</code> was not specified, it's set |
| to the column's grid, so that the formatter inherits the grid's <code>locale</code> style.</p> |
| </p><p> The default value is <code>null</code>.</p><p>This property can be used as the source for data binding.</p><br/><span class="label"> Implementation </span><br/><code> public function get dataTipFormatter():<a href="../../../mx/formatters/IFormatter.html">IFormatter</a></code><br/><code> public function set dataTipFormatter(value:<a href="../../../mx/formatters/IFormatter.html">IFormatter</a>):void</code><br/><p><span class="label">See also</span></p><div class="seeAlso"><a href="GridColumn.html#itemToDataTip" target="">itemToDataTip</a><br/><a href="GridColumn.html#formatter" target="">formatter</a></div></div><a name="propertyDetail"></a><a name="dataTipFunction"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">dataTipFunction</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code>dataTipFunction:Function</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4.5</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 10, AIR 2.5</td></tr></table><p></p><p></p><p> |
| Specifies a callback function to run on each item of the data provider |
| to determine its data tip. |
| This property is used by the <code>itemToDataTip</code> method. |
| |
| <p>By default, if <code>showDataTips</code> is <code>true</code>, |
| the column looks for a property named <code>label</code> |
| on each data provider item and displays it as its data tip. |
| However, some data providers do not have a <code>label</code> property |
| nor do they have another property that you can use for displaying data |
| in the rows.</p> |
| <p>For example, you have a data provider that contains a lastName |
| and firstName fields, but you want to display full names as the data tip. |
| You can specify a function to the <code>dataTipFunction</code> property |
| that returns a single String containing the value of both fields. You |
| can also use the <code>dataTipFunction</code> property for handling |
| formatting and localization.</p> |
| |
| <p>The signature of the <code>dataTipFunction</code> function must match the following: |
| |
| <pre>dataTipFunction(item:Object, column:GridColumn):String</pre> |
| The <code>item</code> parameter is the data provider item for an entire row. |
| The second parameter is this column object.</p> |
| <p>A typical function might concatenate an item's firstName and |
| lastName properties, or do some custom formatting on a Date value |
| property.</p> |
| </p><p> The default value is <code>null</code>.</p><p>This property can be used as the source for data binding.</p><br/><span class="label"> Implementation </span><br/><code> public function get dataTipFunction():Function</code><br/><code> public function set dataTipFunction(value:Function):void</code><br/><p><span class="label">See also</span></p><div class="seeAlso"><a href="GridColumn.html#itemToDataTip" target="">itemToDataTip</a><br/><a href="GridColumn.html#dataTipField" target="">dataTipField</a></div></div><a name="propertyDetail"></a><a name="editable"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">editable</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code>editable:Boolean</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4.5</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 10, AIR 2.5</td></tr></table><p></p><p></p><p> |
| Indicates whether the items in the column are editable. |
| If <code>true</code>, and the associated grid's <code>editable</code> |
| property is also <code>true</code>, the items in a column are |
| editable and can be individually edited |
| by clicking on a selected item, or by navigating to the item and |
| pressing the F2 key. |
| </p><p> The default value is <code>true</code>.</p><p>This property can be used as the source for data binding.</p><br/><span class="label"> Implementation </span><br/><code> public function get editable():Boolean</code><br/><code> public function set editable(value:Boolean):void</code><br/><p><span class="label">See also</span></p><div class="seeAlso"><a href="../../../spark/components/DataGrid.html#editable" target="">spark.components.DataGrid.editable</a></div></div><a name="propertyDetail"></a><a name="editorActivationMouseEvent"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">editorActivationMouseEvent</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code>editorActivationMouseEvent:String</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 5.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 11, AIR 3.0</td></tr></table><p></p><p></p><p> |
| The type of mouse event that starts an editor session. Must be one of |
| values in <code>GridItemEditorMouseEvent</code>. Each grid |
| column may use a different value for cell activation. If no |
| value is specified the DataGrid's <code>editorActivationMouseEvent |
| </code> will be used. |
| |
| </p><p> The default value is <code>null</code>.</p><p>This property can be used as the source for data binding.</p><br/><span class="label"> Implementation </span><br/><code> public function get editorActivationMouseEvent():String</code><br/><code> public function set editorActivationMouseEvent(value:String):void</code><br/><p><span class="label">See also</span></p><div class="seeAlso"><a href="../../../spark/components/DataGrid.html" target="">spark.components.DataGrid</a></div></div><a name="propertyDetail"></a><a name="formatter"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">formatter</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code>formatter:<a href="../../../mx/formatters/IFormatter.html">IFormatter</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4.5</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 10, AIR 2.5</td></tr></table><p></p><p></p><p> |
| Specifies the formatter used by the column's <code>itemToLabel()</code> method to |
| convert data provider items to strings. |
| |
| <p>If the formatter's <code>styleParent</code> was not specified, it's set |
| to the column's grid, so that the formatter inherits the grid's <code>locale</code> style.</p> |
| </p><p> The default value is <code>null</code>.</p><p>This property can be used as the source for data binding.</p><br/><span class="label"> Implementation </span><br/><code> public function get formatter():<a href="../../../mx/formatters/IFormatter.html">IFormatter</a></code><br/><code> public function set formatter(value:<a href="../../../mx/formatters/IFormatter.html">IFormatter</a>):void</code><br/><p><span class="label">See also</span></p><div class="seeAlso"><a href="GridColumn.html#itemToLabel" target="">itemToLabel</a><br/><a href="GridColumn.html#dataTipFormatter" target="">dataTipFormatter</a></div></div><a name="propertyDetail"></a><a name="grid"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">grid</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code>grid:<a href="../../../spark/components/Grid.html">Grid</a></code> [read-only] <p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4.5</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 10, AIR 2.5</td></tr></table><p></p><p></p><p> |
| The Grid object associated with this column. |
| |
| </p><p>This property can be used as the source for data binding.</p><br/><span class="label"> Implementation </span><br/><code> public function get grid():<a href="../../../spark/components/Grid.html">Grid</a></code><br/></div><a name="propertyDetail"></a><a name="headerRenderer"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">headerRenderer</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code>headerRenderer:<a href="../../../mx/core/IFactory.html">IFactory</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4.5</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 10, AIR 2.5</td></tr></table><p></p><p></p><p> |
| The class factory for the IGridItemRenderer class used as |
| the header for this column. |
| If unspecified, the DataGrid controls's <code>columnHeaderGroup</code> |
| skin part defines the default header renderer. |
| |
| </p><p> The default value is <code>null</code>.</p><p>This property can be used as the source for data binding.</p><br/><span class="label"> Implementation </span><br/><code> public function get headerRenderer():<a href="../../../mx/core/IFactory.html">IFactory</a></code><br/><code> public function set headerRenderer(value:<a href="../../../mx/core/IFactory.html">IFactory</a>):void</code><br/><p><span class="label">See also</span></p><div class="seeAlso"><a href="GridColumn.html#headerText" target="">headerText</a><br/><a href="IGridItemRenderer.html" target="">IGridItemRenderer</a></div></div><a name="propertyDetail"></a><a name="headerText"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">headerText</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code>headerText:String</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4.5</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 10, AIR 2.5</td></tr></table><p></p><p></p><p> |
| Text for the header of this column. |
| By default, the associated grid control uses the value of |
| the <code>dataField</code> property as the header text. |
| |
| </p><p>This property can be used as the source for data binding.</p><br/><span class="label"> Implementation </span><br/><code> public function get headerText():String</code><br/><code> public function set headerText(value:String):void</code><br/></div><a name="propertyDetail"></a><a name="imeMode"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">imeMode</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code>imeMode:String</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4.5</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 10, AIR 2.5</td></tr></table><p></p><p></p><p> |
| Specifies the IME (Input Method Editor) mode. |
| The IME enables users to enter text in Chinese, Japanese, and Korean. |
| Flex sets the specified IME mode when the control gets the focus, |
| and sets it back to the previous value when the control loses the focus. |
| <p>The flash.system.IMEConversionMode class defines constants for the |
| valid values for this property. |
| You can also specify <code>null</code> to specify no IME.</p> |
| </p><p> The default value is <code>null</code>.</p><br/><span class="label"> Implementation </span><br/><code> public function get imeMode():String</code><br/><code> public function set imeMode(value:String):void</code><br/><p><span class="label">See also</span></p><div class="seeAlso">flash.system.IMEConversionMode</div></div><a name="propertyDetail"></a><a name="itemEditor"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">itemEditor</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code>itemEditor:<a href="../../../mx/core/IFactory.html">IFactory</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4.5</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 10, AIR 2.5</td></tr></table><p></p><p></p><p> |
| A class factory for IGridItemEditor class used to edit individual |
| grid cells in this column. |
| If this property is null, and the column grid's owner is a DataGrid control, |
| then the value of the DataGrid control's <code>itemEditor</code> property is used. |
| If no item editor is specified by the DataGrid control, |
| then use the DefaultGridItemEditor class. |
| |
| <p>The default item editor is the DefaultGridItemEditor class, |
| which lets you edit a simple text field. |
| You can create custom item renderers by creating a subclass of the GridItemEditor class. |
| Your custom item editor can write data to the entire row of the grid |
| to define more complex editor. </p> |
| |
| </p><p> The default value is <code>null</code>.</p><p>This property can be used as the source for data binding.</p><br/><span class="label"> Implementation </span><br/><code> public function get itemEditor():<a href="../../../mx/core/IFactory.html">IFactory</a></code><br/><code> public function set itemEditor(value:<a href="../../../mx/core/IFactory.html">IFactory</a>):void</code><br/><p><span class="label">See also</span></p><div class="seeAlso"><a href="DefaultGridItemEditor.html" target="">spark.components.gridClasses.DefaultGridItemEditor</a><br/><a href="GridItemEditor.html" target="">spark.components.gridClasses.GridItemEditor</a></div></div><a name="propertyDetail"></a><a name="itemRenderer"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">itemRenderer</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code>itemRenderer:<a href="../../../mx/core/IFactory.html">IFactory</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4.5</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 10, AIR 2.5</td></tr></table><p></p><p></p><p> |
| The class factory for the IGridItemRenderer class used to |
| render individual grid cells. |
| If not specified, use the value of the <code>itemRenderer</code> |
| property from the associated grid control. |
| |
| <p>The default item renderer is the DefaultGridItemRenderer class, |
| which displays the data item as text. |
| You can create custom item renderers by creating a subclass of the GridItemRenderer class. |
| Your custom item renderer can access the data from the entire row of the grid |
| to define more complex visual representation of the cell. </p> |
| |
| <p>The default value is the value of the <code>itemRenderer</code> |
| property from the associated grid control, or null.</p> |
| </p><p>This property can be used as the source for data binding.</p><br/><span class="label"> Implementation </span><br/><code> public function get itemRenderer():<a href="../../../mx/core/IFactory.html">IFactory</a></code><br/><code> public function set itemRenderer(value:<a href="../../../mx/core/IFactory.html">IFactory</a>):void</code><br/><p><span class="label">See also</span></p><div class="seeAlso"><a href="GridColumn.html#dataField" target="">dataField</a><br/><a href="../../../spark/skins/spark/DefaultGridItemRenderer.html" target="">spark.skins.spark.DefaultGridItemRenderer</a><br/><a href="GridItemRenderer.html" target="">spark.components.gridClasses.GridItemRenderer</a></div></div><a name="propertyDetail"></a><a name="itemRendererFunction"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">itemRendererFunction</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code>itemRendererFunction:Function</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4.5</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 10, AIR 2.5</td></tr></table><p></p><p></p><p> |
| If specified, the value of this property must be an idempotent function |
| that returns an item renderer IFactory based on its data provider item |
| and column parameters. |
| Specifying a value to the <code>itemRendererFunction</code> property |
| makes it possible to use more than one item renderer in this column. |
| |
| <p>The function specified to the <code>itemRendererFunction</code> property |
| must have the following signature:</p> |
| <pre>itemRendererFunction(item:Object, column:GridColumn):IFactory</pre> |
| <p>The <code>item</code> parameter is the data provider item for an entire row. |
| The second parameter is this column object.</p> |
| |
| <p>Shown below is an example of an item renderer function:</p> |
| <pre> |
| function myItemRendererFunction(item:Object, column:GridColumn):IFactory |
| { |
| return (item is Array) ? myArrayItemRenderer : myItemRenderer; |
| } |
| </pre> |
| |
| </p><p> The default value is <code>null</code>.</p><p>This property can be used as the source for data binding.</p><br/><span class="label"> Implementation </span><br/><code> public function get itemRendererFunction():Function</code><br/><code> public function set itemRendererFunction(value:Function):void</code><br/></div><a name="propertyDetail"></a><a name="labelFunction"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">labelFunction</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code>labelFunction:Function</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4.5</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 10, AIR 2.5</td></tr></table><p></p><p></p><p> |
| An idempotent function that converts a data provider item into a column-specific string |
| that's used to initialize the item renderer's <code>label</code> property. |
| |
| <p>You can use a label function to combine the values of several data provider items |
| into a single string. |
| If specified, this property is used by the |
| <code>itemToLabel()</code> method, which computes the value of each item |
| renderer's <code>label</code> property in this column.</p> |
| <p>The function specified to the <code>labelFunction</code> property |
| must have the following signature:</p> |
| <pre>labelFunction(item:Object, column:GridColumn):String</pre> |
| <p>The <code>item</code> parameter is the data provider item for an entire row. |
| The second parameter is this column object.</p> |
| <p>A typical label function could concatenate the firstName and |
| lastName properties of the data provider item , |
| or do some custom formatting on a Date value property.</p> |
| |
| </p><p> The default value is <code>null</code>.</p><p>This property can be used as the source for data binding.</p><br/><span class="label"> Implementation </span><br/><code> public function get labelFunction():Function</code><br/><code> public function set labelFunction(value:Function):void</code><br/><p><span class="label">See also</span></p><div class="seeAlso"><a href="GridColumn.html#itemToLabel" target="">itemToLabel</a><br/><a href="GridColumn.html#dataField" target="">dataField</a></div></div><a name="propertyDetail"></a><a name="maxWidth"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">maxWidth</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code>maxWidth:Number</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4.5</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 10, AIR 2.5</td></tr></table><p></p><p></p><p> |
| The maximum width of this column in pixels. |
| If specified, the grid's layout makes the column's layout width the |
| smaller of the width of the <code>typicalItem</code> and the <code>maxWidth</code>. |
| If this column is resizable, this property limits how wide the user can make this column. |
| Setting this property does not change the <code>width</code> |
| or <code>minWidth</code> properties. |
| </p><p> The default value is <code>NaN</code>.</p><p>This property can be used as the source for data binding.</p><br/><span class="label"> Implementation </span><br/><code> public function get maxWidth():Number</code><br/><code> public function set maxWidth(value:Number):void</code><br/></div><a name="propertyDetail"></a><a name="minWidth"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">minWidth</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code>minWidth:Number</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4.5</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 10, AIR 2.5</td></tr></table><p></p><p></p><p> |
| The minimum width of this column in pixels. |
| If specified, the grid's layout makes the column's layout |
| width the larger of the width of the <code>typicalItem</code> and |
| the <code>minWidth</code>. |
| If this column is resizable, this property limits how small |
| the user can make this column. |
| Setting this property does not change the <code>width</code> |
| or <code>maxWidth</code> properties. |
| |
| </p><p> The default value is <code>20</code>.</p><p>This property can be used as the source for data binding.</p><br/><span class="label"> Implementation </span><br/><code> public function get minWidth():Number</code><br/><code> public function set minWidth(value:Number):void</code><br/></div><a name="propertyDetail"></a><a name="percentWidth"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">percentWidth</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code>percentWidth:Number</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4.12.2</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 13, AIR 13.0</td></tr></table><p></p><p></p><p> |
| The width of this column as a percentage of DataGrid width. |
| Setting this property does not change the <code>width</code> |
| or <code>minWidth</code> properties. |
| </p><p> The default value is <code>NaN</code>.</p><p>This property can be used as the source for data binding.</p><br/><span class="label"> Implementation </span><br/><code> public function get percentWidth():Number</code><br/><code> public function set percentWidth(value:Number):void</code><br/></div><a name="propertyDetail"></a><a name="rendererIsEditable"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">rendererIsEditable</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code>rendererIsEditable:Boolean</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4.5</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 10, AIR 2.5</td></tr></table><p></p><p></p><p> |
| Determines whether any of the item renderer's controls are editable. |
| If the column is editable, the focusable controls in the item renderer |
| are given keyboard focus when the user starts editing the item |
| renderer. |
| <p>When you set this property to <code>true</code>, the cell becomes |
| editable when the user clicks inside of it. |
| Because the cell is editable, the DataGrid displays the <code>editorIndicator</code> |
| skin part, which appears on top of the <code>selectionIndicator</code> skin part. |
| Therefore, the user does not see an indicator for cell selection until the |
| edit session is complete. |
| You can create a custom skin to remove or modify the <code>editorIndicator</code> |
| skin part so that the <code>selectionIndicator</code> skin part appears. |
| For example, you can set <code>alpha</code> property of the <code>editorIndicator</code> |
| to allow the <code>selectionIndicator</code> to show through, or change |
| the size of the editorIndicator so that it is smaller than the cell.</p> |
| |
| <p>By setting this property to <code>true</code>, you take responsibility for |
| validating and saving input collected by the item renderer. |
| If the item renderer contains an override of the <code>IGridItemRenderer.prepare()</code> method, |
| then you must ensure that unsaved input field changes are not overwritten. |
| For example, <code>rendererIsEditable</code> is <code>true</code> |
| and the renderer contains a single TextInput element that displays |
| the value of <code>data.myDataField</code>. |
| If the renderer's <code>prepare()</code> method sets the TextInput control's |
| <code>text</code> property, then the <code>prepare()</code> method must |
| not set the <code>text</code> property when there are pending changes.</p> |
| |
| </p><p> The default value is <code>false</code>.</p><p>This property can be used as the source for data binding.</p><br/><span class="label"> Implementation </span><br/><code> public function get rendererIsEditable():Boolean</code><br/><code> public function set rendererIsEditable(value:Boolean):void</code><br/></div><a name="propertyDetail"></a><a name="resizable"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">resizable</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code>resizable:Boolean</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4.5</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 10, AIR 2.5</td></tr></table><p></p><p></p><p> |
| Indicates whether the user is allowed to resize |
| the width of the column. |
| If <code>true</code>, and the <code>resizableColumns</code> property of |
| the associated grid is also <code>true</code>, the user can drag |
| the grid lines between the column headers to resize the column. |
| |
| </p><p> The default value is <code>true</code>.</p><p>This property can be used as the source for data binding.</p><br/><span class="label"> Implementation </span><br/><code> public function get resizable():Boolean</code><br/><code> public function set resizable(value:Boolean):void</code><br/></div><a name="propertyDetail"></a><a name="showDataTips"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">showDataTips</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code>showDataTips:*</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4.5</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 10, AIR 2.5</td></tr></table><p></p><p></p><p> |
| Indicates whether the datatips are shown in the column. |
| If <code>true</code>, datatips are displayed for text in the rows. |
| Datatips are tooltips designed to show the text that is too long for the row. |
| |
| <p>If this property's value is undefined, the default, then the associated |
| grid's <code>showDataTips</code> property determines if datatips are shown. |
| If this property is set, the grid's <code>showDataTips</code> property is ignored.</p> |
| |
| </p><p> The default value is <code>undefined</code>.</p><p>This property can be used as the source for data binding.</p><br/><span class="label"> Implementation </span><br/><code> public function get showDataTips():*</code><br/><code> public function set showDataTips(value:any):void</code><br/><p><span class="label">See also</span></p><div class="seeAlso"><a href="GridColumn.html#getShowDataTips" target="">getShowDataTips</a></div></div><a name="propertyDetail"></a><a name="sortable"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">sortable</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code>sortable:Boolean</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4.5</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 10, AIR 2.5</td></tr></table><p></p><p></p><p> |
| If <code>true</code>, and if the grid's data provider is an ICollectionView, |
| and if the associated grid's <code>sortableColumns</code> property is <code>true</code>, |
| then this column supports interactive sorting. |
| Typically the column's header handles mouse clicks by setting the data provider's |
| <code>sort</code> property to a Sort object whose SortField is this column's <code>dataField</code>. |
| |
| <p>If the data provider is not an ICollectionView, then this property has no effect.</p> |
| |
| </p><p> The default value is <code>true</code>.</p><p>This property can be used as the source for data binding.</p><br/><span class="label"> Implementation </span><br/><code> public function get sortable():Boolean</code><br/><code> public function set sortable(value:Boolean):void</code><br/></div><a name="propertyDetail"></a><a name="sortCompareFunction"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">sortCompareFunction</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code>sortCompareFunction:Function</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4.5</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 10, AIR 2.5</td></tr></table><p></p><p></p><p> |
| The function that compares two elements during a sort of on the |
| data elements of this column. |
| If you specify a value of the <code>labelFunction</code> property, |
| you typically also provide a <code>sortCompareFunction</code>. |
| <p>The sortCompareFunction's signature must match the following:</p> |
| <pre>sortCompareFunction(obj1:Object, obj2:Object, column:GridColumn):int</pre> |
| |
| <p>The function should return a value based on the comparison |
| of the objects: </p> |
| <ul> |
| <li>-1 if obj1 should appear before obj2 in ascending order. </li> |
| <li>0 if obj1 = obj2. </li> |
| <li>1 if obj1 should appear after obj2 in ascending order.</li> |
| </ul> |
| |
| <p>The function may use the column parameter to write generic |
| compare functions.</p> |
| |
| <p><b>Note:</b> The <code>obj1</code> and |
| <code>obj2</code> parameters are entire data provider elements and not |
| just the data for the item.</p> |
| |
| <p>If the dataProvider is not an ICollectionView, then this property has no effect.</p> |
| |
| </p><p> The default value is <code>null</code>.</p><p>This property can be used as the source for data binding.</p><br/><span class="label"> Implementation </span><br/><code> public function get sortCompareFunction():Function</code><br/><code> public function set sortCompareFunction(value:Function):void</code><br/></div><a name="propertyDetail"></a><a name="sortCompareType"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">sortCompareType</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code>sortCompareType:String</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4.11</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 11.8, AIR 3.8</td></tr></table><p></p><p></p><p> |
| The sortCompareType defines the valid constant values for the |
| <code>sortCompareType</code> property of the <code>SortField</code> and <code>GridColumn</code>. |
| |
| <p>Use the constants in ActionsScript, as the following example shows:</p> |
| <pre> |
| column.sortCompareType = SortFieldCompareTypes.NUMERIC; |
| </pre> |
| <p>In MXML, use the String value of the constants, as the following example shows:</p> |
| <pre> |
| <s:GridColumn sortCompareType="numeric" /> |
| </pre> |
| |
| </p><p>This property can be used as the source for data binding.</p><br/><span class="label"> Implementation </span><br/><code> public function get sortCompareType():String</code><br/><code> public function set sortCompareType(value:String):void</code><br/><p><span class="label">See also</span></p><div class="seeAlso">spark.collections.SortFieldCompareTypes</div></div><a name="propertyDetail"></a><a name="sortDescending"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">sortDescending</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code>sortDescending:Boolean</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4.5</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 10, AIR 2.5</td></tr></table><p></p><p></p><p> |
| If <code>true</code>, this column is sorted in descending order. |
| For example, if the column's <code>dataField</code> contains a numeric value, |
| then the first row would be the one with the largest value |
| for this column. |
| <p>Setting this property does not start a sort; it only sets the sort direction. |
| When the <code>dataProvider.refresh()</code> method is called, the sort is performed.</p> |
| |
| <p>If the data provider is not an ICollectionView, then this property has no effect.</p> |
| |
| </p><p> The default value is <code>false</code>.</p><p>This property can be used as the source for data binding.</p><br/><span class="label"> Implementation </span><br/><code> public function get sortDescending():Boolean</code><br/><code> public function set sortDescending(value:Boolean):void</code><br/></div><a name="propertyDetail"></a><a name="sortField"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">sortField</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code>sortField:<a href="../../../mx/collections/ISortField.html">ISortField</a></code> [read-only] <p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4.5</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 10, AIR 2.5</td></tr></table><p></p><p></p><p> |
| Returns a SortField that can be used to sort a collection by this |
| column's <code>dataField</code>. |
| |
| <p>If the <code>sortCompareFunction</code> property is defined, |
| then the SortField's <code>compareFunction</code> is automatically set.</p> |
| |
| <p>If the <code>sortCompareFunction</code> property is not defined |
| and the <code>dataField</code> is complex, then the SortField's |
| compare function is assigned to a closure around a default compare |
| function that handles the complex <code>dataField</code>.</p> |
| <p>If the <code>sortCompareFunction</code> and |
| <code>dataField</code> properties are not defined, but the |
| <code>labelFunction</code> property is defined, then it assigns the |
| <code>compareFunction</code> to a closure that does a basic string compare |
| on the <code>labelFunction</code> applied to the data objects.</p> |
| </p><br/><span class="label"> Implementation </span><br/><code> public function get sortField():<a href="../../../mx/collections/ISortField.html">ISortField</a></code><br/><p><span class="label">See also</span></p><div class="seeAlso"><a href="../../../spark/collections/SortField.html" target="">spark.collections.SortField</a></div></div><a name="propertyDetail"></a><a name="visible"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">visible</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code>visible:Boolean</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4.5</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 10, AIR 2.5</td></tr></table><p></p><p></p><p> |
| If <code>true</code>, then display this column. |
| If <code>false</code>, no space will be allocated |
| for this column; it will not be included in the layout. |
| |
| </p><p> The default value is <code>true</code>.</p><p>This property can be used as the source for data binding.</p><br/><span class="label"> Implementation </span><br/><code> public function get visible():Boolean</code><br/><code> public function set visible(value:Boolean):void</code><br/></div><a name="propertyDetail"></a><a name="width"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">width</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code>width:Number</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4.5</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 10, AIR 2.5</td></tr></table><p></p><p></p><p> |
| The width of this column in pixels. |
| If specified, the grid's layout ignores its |
| <code>typicalItem</code> property and this column's |
| <code>minWidth</code> and <code>maxWidth</code> properties. |
| |
| </p><p> The default value is <code>NaN</code>.</p><p>This property can be used as the source for data binding.</p><br/><span class="label"> Implementation </span><br/><code> public function get width():Number</code><br/><code> public function set width(value:Number):void</code><br/></div><a name="constructorDetail"></a><div class="detailSectionHeader">Constructor Detail</div><a name="GridColumn()"></a><a name="GridColumn(String)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">GridColumn</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">Constructor</td></tr></table><div class="detailBody"><code>public function GridColumn(columnName:String = null)</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4.5</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 10, AIR 2.5</td></tr></table><p></p><p> |
| Constructor. |
| |
| </p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">columnName</span>:String</code> (default = <code>null</code>)<code></code> — Initial value for the <code>dataField</code> and |
| <code>headerText</code> properties. |
| |
| </td></tr></table></div><a name="methodDetail"></a><div class="detailSectionHeader">Method Detail</div><a name="itemToDataTip()"></a><a name="itemToDataTip(Object)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">itemToDataTip</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td></tr></table><div class="detailBody"><code> public function itemToDataTip(item:Object):String</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4.5</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 10, AIR 2.5</td></tr></table><p></p><p></p><p> |
| Convert the specified data provider item to a column-specific datatip String. |
| |
| <p>This method uses the values <code>dataTipField</code> |
| and <code>dataTipFunction</code>. |
| If those properties are null, it uses the corresponding properties |
| from the associated grid control. |
| If <code>dataTipField</code> properties is also null in the grid control, |
| then use the <code>dataField</code> property.</p> |
| |
| <p>If <code>dataTipFunction</code> and <code>dataTipFormatter</code> are |
| null, then this method's value is the same as: |
| <code>item[dataTipField].toString()</code>. If <code>dataTipFormatter</code> is |
| specified then this method's value is the same as: |
| <code>dataTipFormatter.format(item[dataTipField])</code> |
| If resolving the item's <code>dataField</code> |
| causes an error to be thrown, <code>ERROR_TEXT</code> is returned.</p> |
| |
| <p>If <code>item</code> and <code>dataTipFunction</code> |
| are not null, then this method returns |
| <code>dataTipFunction(item, this)</code>, where the second argument is |
| this GridColumn.</p> |
| </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">item</span>:Object</code> — The value of <code>grid.dataProvider.getItemAt(rowIndex)</code>. |
| |
| </td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>String</code> — A column-specific string for the specified data provider item |
| or <code>ERROR_TEXT</code>. |
| |
| </td></tr></table></div><a name="itemToLabel()"></a><a name="itemToLabel(Object)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">itemToLabel</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code> public function itemToLabel(item:Object):String</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4.5</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 10, AIR 2.5</td></tr></table><p></p><p></p><p> |
| Convert the specified data provider item to a column-specific String. |
| This method is used to initialize item renderers' <code>label</code> property. |
| |
| <p>If <code>labelFunction</code> is null, and <code>dataField</code> |
| is a string that does not contain "." field name separator characters, |
| and formatter is null, then this method is equivalent to:</p> |
| <pre>item[dataField].toString()</pre> |
| |
| <p>If the formatter was specified, then this method's value is:</p> |
| |
| <pre>formatter.format(item[dataField])</pre> |
| <p>If <code>dataField</code> is a "." separated |
| path, then this method looks up each successive path element. |
| For example if <code>="foo.bar.baz"</code>, then this method returns |
| a string based on the value of <code>item.foo.bar.baz</code>. |
| If resolving the item's <code>dataField</code> |
| causes an error to be thrown, ERROR_TEXT is returned.</p> |
| |
| <p>If <code>item</code> and <code>labelFunction</code> are not null, |
| then this method returns <code>labelFunction(item, this)</code>, |
| where the second argument is this GridColumn.</p> |
| </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">item</span>:Object</code> — The value of <code>grid.dataProvider.getItemAt(rowIndex)</code>. |
| |
| </td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>String</code> — A column-specific string for the specified dataProvider item or ERROR_TEXT. |
| |
| </td></tr></table></div><a name="itemToRenderer()"></a><a name="itemToRenderer(Object)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">itemToRenderer</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code> public function itemToRenderer(item:Object):<a href="../../../mx/core/IFactory.html">IFactory</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4.5</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 10, AIR 2.5</td></tr></table><p></p><p></p><p> |
| Convert the specified data provider item to a column-specific item renderer factory. |
| By default this method calls the <code>itemRendererFunction</code> if it's |
| non-null, otherwise it just returns the value of the column's <code>itemRenderer</code> |
| property. |
| </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">item</span>:Object</code> — The value of <code>grid.dataProvider.getItemAt(rowIndex)</code>. |
| |
| </td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../../mx/core/IFactory.html">IFactory</a></code> — A column-specific item renderer factory for the specified dataProvider item. |
| |
| </td></tr></table></div><div class="detailSectionHeader">Constant Detail</div><a name="constantDetail"></a><a name="ERROR_TEXT"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">ERROR_TEXT</td><td class="detailHeaderType">Constant</td></tr></table><div class="detailBody"><code>public static const ERROR_TEXT:String = </code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4.5</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 10, AIR 2.5</td></tr></table><p></p><p></p><p> |
| The return value for the <code>itemToLabel()</code> or |
| <code>itemToDataTip()</code> method if resolving the corresponding |
| property name (path) fails. |
| The value of this constant is a single space String: <code>" "</code>. |
| |
| </p><p><span class="label">See also</span></p><div class="seeAlso"><a href="GridColumn.html#itemToLabel" target="">itemToLabel</a><br/><a href="GridColumn.html#itemToDataTip" target="">itemToDataTip</a></div></div><a name="includeExamplesSummary"></a><div class="detailSectionHeader">Examples</div><div class="exampleHeader">GridColumnExample.mxml</div><div class="detailBody"><div class="listing"><pre><?xml version="1.0" encoding="utf-8"?> |
| <!-- |
| |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| |
| --> |
| |
| <!-- |
| |
| A simple example of a DataGrid with explicitly specified columns. |
| |
| The DataGrid's columns are specified by an ArrayList (an IList) and can always be accessed as such. |
| For example dataGrid.columns.length returns the total number of columns and |
| dataGrid.columns.getItemAt(index) returns the GridColumn at the specified index. The columns list |
| is mutable, which means that GridColumns can be added or removed at any time. |
| |
| Column widths do not depend on the column's headerText, they're based on the rendered widths of |
| the DataGrid's typicalItem. If that's not specified, then the first data item is used. That's the |
| case here. Each column can specify an explicit width and by default all GridColumns are |
| resizable="true", which means that the column can be interactively resized by dragging the edges |
| between columns. Interactively resizing column widths changes the DataGrid's measuredWidth which |
| can be a little disconcerting if the DataGrid's width is not constrained. In this example we've |
| constrained the DataGrid's left and right edges which prevents changes in the DataGrid's |
| measuredWidth from affecting its actual width. |
| |
| --> |
| |
| <s:Application |
| xmlns:fx="http://ns.adobe.com/mxml/2009" |
| xmlns:s="library://ns.adobe.com/flex/spark"> |
| |
| <s:Panel title="Spark DataGrid Control Example which demonstrates a simple DataGrid with explicitly specified columns" |
| width="75%" height="75%" |
| horizontalCenter="0" verticalCenter="0"> |
| |
| <s:DataGrid id="dataGrid" left="5" right="5" top="5" bottom="5"> |
| <s:columns> |
| <s:ArrayList> |
| <s:GridColumn dataField="key" headerText="Key"/> |
| <s:GridColumn dataField="name" headerText="Name"/> |
| <s:GridColumn dataField="price" headerText="Price"/> |
| <s:GridColumn dataField="call" headerText="Call"/> |
| </s:ArrayList> |
| </s:columns> |
| |
| <s:ArrayCollection> |
| <s:DataItem key="1000" name="Abrasive" price="100.11" call="false"/> |
| <s:DataItem key="1001" name="Brush" price="110.01" call="true"/> |
| <s:DataItem key="1002" name="Clamp" price="120.02" call="false"/> |
| <s:DataItem key="1003" name="Drill" price="130.03" call="true"/> |
| <s:DataItem key="1004" name="Epoxy" price="140.04" call="false"/> |
| <s:DataItem key="1005" name="File" price="150.05" call="true"/> |
| <s:DataItem key="1006" name="Gouge" price="160.06" call="false"/> |
| <s:DataItem key="1007" name="Hook" price="170.07" call="true"/> |
| <s:DataItem key="1008" name="Ink" price="180.08" call="false"/> |
| <s:DataItem key="1009" name="Jack" price="190.09" call="true"/> |
| </s:ArrayCollection> |
| </s:DataGrid> |
| </s:Panel> |
| </s:Application> |
| </pre></div><script language="javascript" type="text/javascript"><!-- AC_FL_RunContent( "src", "examples/GridColumnExample", "width", "100%", |
| "height","400px", "salign", "TL", "id", "example1", "quality", "high", "bgcolor", "", "name", |
| "example1", "flashvars","", "allowScriptAccess","sameDomain", "type", |
| "application/x-shockwave-flash","pluginspage", "http://www.macromedia.com/go/getflashplayer" ); --></script></div><div class="exampleHeader">GridColumnVisibilityExample.mxml</div><div class="detailBody"><div class="listing"><pre><?xml version="1.0" encoding="utf-8"?> |
| <!-- |
| |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| |
| --> |
| |
| <!-- |
| |
| Demonstrate the GridColumn visible property and the support for dynamically adding and removing columns. |
| |
| After selecting a column it's visibility can be changed, a copy of the column can be inserted, and the column can be removed. |
| |
| The DataGrid columns property is a mutable list - an IList, like ArrayList - and columns can be added or removed at any time. The difference |
| between an IList and an intrinsic collection type like Array or Vector is that ILists dispatch events when they're changed. That's why the |
| DropDownList, whose dataProvider is the list of columns, tracks the changes made with the Add/Remove buttons. |
| |
| Changing a column's visibility does not change its presence or position in the columns IList but it prevents the DataGrid from displaying it. |
| |
| --> |
| |
| <s:Application |
| xmlns:fx="http://ns.adobe.com/mxml/2009" |
| xmlns:s="library://ns.adobe.com/flex/spark"> |
| |
| <fx:Script> |
| <![CDATA[ |
| // Insert a column to the left of specified column |
| private function addNewColumn(column:GridColumn):void |
| { |
| const newColumn:GridColumn = new GridColumn(); |
| newColumn.dataField = column.dataField; |
| newColumn.headerText = column.headerText + "+"; |
| dataGrid.columns.addItemAt(newColumn, column.columnIndex); |
| } |
| |
| // Remove the specified column |
| private function removeColumn(column:GridColumn):void |
| { |
| dataGrid.columns.removeItemAt(column.columnIndex); |
| } |
| ]]> |
| </fx:Script> |
| |
| <s:Panel title="Spark DataGrid Control Example which demonstrates the GridColumn visible property and dynamically adding and removing columns" |
| width="75%" height="75%" |
| horizontalCenter="0" verticalCenter="0"> |
| |
| <s:controlBarContent> |
| <s:HGroup verticalAlign="baseline"> |
| <s:DropDownList id="ddl" prompt="Select" dataProvider="{dataGrid.columns}" labelField="headerText"/> |
| <s:Label text="Visible:"/> |
| <s:CheckBox selected="@{ddl.selectedItem.visible}" enabled="{ddl.selectedItem}"/> |
| <s:Button label="Add" click="addNewColumn(ddl.selectedItem)" enabled="{ddl.selectedItem}"/> |
| <s:Button label="Remove" click="removeColumn(ddl.selectedItem)" enabled="{ddl.selectedItem}"/> |
| </s:HGroup> |
| </s:controlBarContent> |
| |
| <s:DataGrid id="dataGrid" left="5" right="5" top="5" bottom="5"> |
| <s:columns> |
| <s:ArrayList> |
| <s:GridColumn dataField="key" headerText="Key"/> |
| <s:GridColumn dataField="name" headerText="Name"/> |
| <s:GridColumn dataField="price" headerText="Price"/> |
| <s:GridColumn dataField="call" headerText="Call"/> |
| </s:ArrayList> |
| </s:columns> |
| |
| <s:ArrayCollection> |
| <s:DataItem key="1000" name="Abrasive" price="100.11" call="false"/> |
| <s:DataItem key="1001" name="Brush" price="110.01" call="true"/> |
| <s:DataItem key="1002" name="Clamp" price="120.02" call="false"/> |
| <s:DataItem key="1003" name="Drill" price="130.03" call="true"/> |
| <s:DataItem key="1004" name="Epoxy" price="140.04" call="false"/> |
| <s:DataItem key="1005" name="File" price="150.05" call="true"/> |
| <s:DataItem key="1006" name="Gouge" price="160.06" call="false"/> |
| <s:DataItem key="1007" name="Hook" price="170.07" call="true"/> |
| <s:DataItem key="1008" name="Ink" price="180.08" call="false"/> |
| <s:DataItem key="1009" name="Jack" price="190.09" call="true"/> |
| </s:ArrayCollection> |
| </s:DataGrid> |
| </s:Panel> |
| </s:Application> |
| |
| |
| </pre></div><script language="javascript" type="text/javascript"><!-- AC_FL_RunContent( "src", "examples/GridColumnVisibilityExample", "width", "100%", |
| "height","400px", "salign", "TL", "id", "example2", "quality", "high", "bgcolor", "", "name", |
| "example2", "flashvars","", "allowScriptAccess","sameDomain", "type", |
| "application/x-shockwave-flash","pluginspage", "http://www.macromedia.com/go/getflashplayer" ); --></script></div><br/><br/><hr><br/><p></p><center class="copyright"><footer>The Apache Software Foundation</footer><br/>Wed Nov 15 2017, 09:50 AM +01:00 </center></div></body></html><!--The Apache Software Foundation<br/>Wed Nov 15 2017, 09:50 AM +01:00 --> |