1 Reply Latest reply on Dec 11, 2006 4:45 PM by chris.huston.t10

    How to display data in a grid after selecting topic from combo box?

    Flash021
      could someone help me out? i'm displaying a combo box (about 20 items) vertically. when user selects one of these items, i'd like for information regarding that choice to be displayed in my data grid. thanks - Karl from Kansas
        • 1. Re: How to display data in a grid after selecting topic from combo box?
          chris.huston.t10 Level 3
          If you have the following:
          <mx:ComboBox id="combo_box" dataProvider="{users}" labelField="user_name" change="show_details(event)" ></mx:ComboBox>

          <mx:DataGrid id="data_grid" >
          <mx:columns>
          <mx:DataGridColumn headerText="Name" dataField="user_name"/>
          <mx:DataGridColumn headerText="email" dataField="email"/>
          </mx:columns>
          </mx:DataGrid>

          private function show_details(evt:Event):void {
          data_grid.dataProvider = evt.currentTarget.selectedItem
          }

          This assumes that your combo box data has a user_name and email property value. Substitute your property values where needed.

          Vygo