我有一个可编辑的数据网格,我需要能够通过 ColdFusion 中的 CFC 将其与其他表单字段一起保存。
基本上,目的是通过 RO 检索到许多位置,这些位置构成第一列,其余列是数据类型,即人口统计、客户备注、约会等,其想法是用户勾选每个复选框网格表示他们很乐意与这些位置共享数据类型。必须以这种方式完成,因为位置可能会发生变化,因此随着时间的推移可能会有两个或四个或更多。
代码运行到目前为止运行并且看起来不错但是节省位让我发疯!请帮忙。
在此先感谢 :) 代码(出于理智的原因而缩写)如下:
public function handleconsentResult(event:ResultEvent):void {
consentDatagrid.dataProvider = event.result;
}
<mx:RemoteObject id="consentQuery"
destination="ColdFusion"
source="Build3.consent"
showBusyCursor="true">
<mx:method name="getconsent" result="handleconsentResult(event)" fault="fault(event)" />
<mx:DataGrid id="consentDatagrid" creationComplete="init()" width="98%" wordWrap="true" textAlign="center">
<mx:columns>
<mx:DataGridColumn headerText="Organisation" width="100" textAlign="left" id="Location" dataField="LocationName" wordWrap="true"/>
<mx:DataGridColumn headerText="Demographics" width="100" wordWrap="true" textAlign="center" itemRenderer="mx.controls.CheckBox" rendererIsEditor="true" editorDataField="ClientDemographics" />
<mx:DataGridColumn headerText="Appointments" width="100" wordWrap="true" textAlign="center" itemRenderer="mx.controls.CheckBox" rendererIsEditor="true" editorDataField="ClientAppointments"/>
<mx:DataGridColumn headerText="Activity" width="70" wordWrap="true" textAlign="center" itemRenderer="mx.controls.CheckBox" rendererIsEditor="true" editorDataField="ClientActivity"/>
<mx:DataGridColumn headerText="Notes" width="50" wordWrap="true" textAlign="center" itemRenderer="mx.controls.CheckBox" rendererIsEditor="true" editorDataField="ClientNotes"/>
</mx:columns>
</mx:DataGrid>