Packageorg.openzet.controls
Classpublic class DGComboBox
InheritanceDGComboBox Inheritance ZetComboBox Inheritance mx.controls.ComboBox
SubclassesDGComboBoxItemRenderer

DGComboBox class extends ZetComboBox by implementing a DataGrid control as its dropdown. This class defines selectedField property to allow users to select a single cell in a DataGrid control.

View the examples.



Public Properties
 PropertyDefined by
 InheriteddropdownHeight : Number
Property to set dropdown's height.
ZetComboBox
  selectedField : String
Property to track which columnField has been selected when user has clicked on a specific cell.
DGComboBox
 InheritedselectedItem : Object
Overriden method to synchronize ComboBox's selectedItem property and dropdown's selectedItem property.
ZetComboBox
Public Methods
 MethodDefined by
  
Constructor

Sets its dropdownFactory as that of DataGrid.

DGComboBox
Events
 EventSummaryDefined by
    DGComboBox
Property detail
selectedFieldproperty
selectedField:String  [read-write]

Property to track which columnField has been selected when user has clicked on a specific cell.

Implementation
    public function get selectedField():String
    public function set selectedField(value:String):void
Constructor detail
DGComboBox()constructor
public function DGComboBox()

Constructor

Sets its dropdownFactory as that of DataGrid.

Event detail
selectedFieldChangedevent 
Event object type: org.openzet.events.DGComboEvent

Examples
DGComboBoxExample
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
    xmlns:zet="org.openzet.controls.*" creationComplete="init();">
    <mx:Script>
        <![CDATA[
            import org.openzet.utils.DataUtil;
            import org.openzet.utils.DataGridUtil;
            import mx.collections.ArrayCollection;
        
            [Bindable]
            public var arr:ArrayCollection = new ArrayCollection([
            {A:10, B:20, C:30},
            {A:20, B:30, C:40},
            {A:30, B:40, C:50},
            {A:40, B:50, C:60},
            {A:50, B:60, C:70}]);
            
        ]]>
    </mx:Script>
    <zet:DGComboBox id="dgCombo" prompt="select one" dataProvider="{arr}" dropdownWidth="200"  />
</mx:Application>