我有这个数据网格:
<mx:DataGrid id="dgCompetenteN" includeIn="Test" left="10" right="472" top="69" bottom="149"
dataProvider="{colCompetente}" editable="false">
<mx:columns>
<mx:DataGridColumn headerText="ID Competență" dataField="idCompetenta"/>
<mx:DataGridColumn headerText="Denumire Competență" dataField="denCompetenta"/>
<mx:DataGridColumn headerText="Competență Superioară" dataField="idCompSuperioara" rendererIsEditor="true" editorDataField="idCompSuperioara" itemRenderer="renderers.CompetentaSuperioara"/>
</mx:columns>
</mx:DataGrid>
和这张表格:
<s:Form includeIn="Test" x="536" y="69">
<s:FormItem label="Denumire competenta">
<s:helpContent>
<s:Label text="Help String"></s:Label>
</s:helpContent>
<s:TextInput text="{dgCompetenteN.selectedItem.denCompetenta}"/>
</s:FormItem>
<s:FormItem label="Competenta superioara">
<s:helpContent>
<s:Label text="Help String"></s:Label>
</s:helpContent>
<s:DropDownList dataProvider="{colCompetente}"
labelField="denCompetenta">
</s:DropDownList>
</s:FormItem>
</s:Form>
我想要做的是,当我在数据网格中选择一项时,下拉列表中选择的项应该是正确的项(字段idCompSuperiara等于所选数据网格行中的第三个元素的项)。
有什么主意吗?
谢谢。
1条答案
按热度按时间ndasle7k1#
试着做一些这样的事情:
itemClickHandler:
数据网格:
表格: