选择数据网格项目时,在详细信息表单下拉列表中选择项目
我有这个数据网格:
<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>
我想要做的是,当我在数据网格中选择一项时,下拉列表中的所选项目应该是正确的项目(字段 idCompSuperioara 等于中的第三个元素的项目)选定的数据网格行)。
有什么想法吗?
谢谢。
I have this datagrid:
<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>
and this form:
<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>
What I want to do is, when I select an item in the datagrid, the selected item of the dropdown should be the correct one (the one which has the field idCompSuperioara equal to the third element in the selected datagrid row).
Any ideas?
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试按照以下方式进行操作:
itemClickHandler:
DataGrid:
表单:
Try something along these lines:
The itemClickHandler:
The DataGrid:
The form: