title: Custom component dataGrid selectionMode as a property
body: <p>I have a custom component of which have a advancedDataGrid inside it. I want this component to be reusable so need is set the datagid selectionMode as a component property.</p>
  
  <p>In mxml i want set property like this:</p>
  
  <pre><code>&lt;comp:MyComp itemDataGridSelectionMode="singleCell" .../&gt;
  </code></pre>
  
  <p>Inside MyComp actionScript i have a metatag like this:</p>
  
  <pre><code>[Inspectable(enumeration="singleRow, multipleRows, singleCell, multipleCells", defaultValue="singleRow")]
  public var itemDataGridSelectionMode:String;
  </code></pre>
  
  <p>How do i bind this itemDataGridSelectionMode variable to advancedDatagrid selectionMode?</p>
  
  <p>UPDATE: Here is a small test application fully working code:</p>
  
  <pre><code>&lt;!--MyComp.mxml--&gt;
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;s:Group xmlns:fx="http://ns.adobe.com/mxml/2009" 
       xmlns:s="library://ns.adobe.com/flex/spark" 
       xmlns:mx="library://ns.adobe.com/flex/mx" width="638" height="500"&gt;
  &lt;fx:Declarations&gt;
      &lt;!-- Place non-visual elements (e.g., services, value objects) here --&gt;
  &lt;/fx:Declarations&gt;
  
  &lt;fx:Script&gt;
      &lt;![CDATA[
          [Inspectable(enumeration="singleRow, multipleRows, singleCell, multipleCells", defaultValue="singleRow")]
          public function set itemsSelectionMode(value:String):void
          {
              this.adgItems.selectionMode = value;
          }
  
          public function get itemsSelectionMode():String
          {
              return this.adgItems.selectionMode;
          }
      ]]&gt;
  &lt;/fx:Script&gt;
  &lt;mx:AdvancedDataGrid id="adgItems" designViewDataType="flat" width="100%" height="100%"&gt;
      &lt;mx:columns&gt;
          &lt;mx:AdvancedDataGridColumn headerText="Column 1" dataField="col1"/&gt;
          &lt;mx:AdvancedDataGridColumn headerText="Column 2" dataField="col2"/&gt;
          &lt;mx:AdvancedDataGridColumn headerText="Column 3" dataField="col3"/&gt;
      &lt;/mx:columns&gt;
  &lt;/mx:AdvancedDataGrid&gt;
  &lt;/s:Group&gt;
  
  &lt;!-- Application.mxml --&gt;
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
             xmlns:s="library://ns.adobe.com/flex/spark" 
             xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:comp="*"&gt;
  &lt;fx:Declarations&gt;
      &lt;!-- Place non-visual elements (e.g., services, value objects) here --&gt;
  &lt;/fx:Declarations&gt;
  &lt;comp:MyComponent x="272" y="86" itemsSelectionMode="singleCell"/&gt;
  &lt;/s:Application&gt;
  </code></pre>
  
  <p>Error: Invalid value: multipleRows. It must be one of singleRow, multipleRows, singleCell, multipleCells.</p>