我如何发现 Flex 数据网格中的某个项目已完成编辑?

发布于 2024-11-27 22:05:52 字数 5031 浏览 1 评论 0原文

请告诉我,我如何发现 Flex 数据网格中的项目已完成编辑?

实际上我正在使用 Flex 4 并为 AIR 开发应用程序,我需要制作一个可编辑的网格。我所有的定制编辑器都可以工作,但本机文本输入类型编辑器无法工作。

这是我的完整代码。

当我编辑第三个也是最后一个数据网格列时,它不会更新值。

<mx:DataGrid id="id_RecentPatientGrid" includeInLayout="{includeGridInLayout}" visible="{includeGridInLayout}"
             rowCount="{id_RecentPatientGrid.dataProvider.length + 1}"
             width="100%" verticalScrollPolicy="off"
             editable="true"
             itemEditBegin="recentPatientGridItemEditBeginHandler(event)" 
             itemEditEnd="recentPatientGridItemEditEndHandler(event)"
             dataProvider="{immunizationCollection}" draggableColumns="false"  useRollOver="false"
             sortableColumns="false" fontFamily="Verdana" verticalGridLines="false"                 
             styleName="QIGrid"  
             headerStyleName="QIGridHeader" 
             headerBackgroundSkin="com.adobe.Quivus.view.controls.skins.dataGridSkins.DataGridHeaderBlueSkin"
             headerSeparatorSkin="com.adobe.Quivus.view.controls.skins.dataGridSkins.DatagridHeaderSeparatorSkin">
    <!--headerBackgroundSkin="com.adobe.Quivus.view.controls.skins.dataGridSkins.dataGridHeaderSkin"-->
    <mx:columns>
        <!-- Changes by baber waqas for displaying serial number  -->   
        <mx:DataGridColumn headerText="Sr.#"       width="50" editable="false" labelFunction="displayRowNum" />
        <mx:DataGridColumn headerText="Visit Date" width="50" editable="false" labelFunction="displayVisitDate" />
        <mx:DataGridColumn headerText="Date Admin" width="60" editable="true"  dataField="DateAdmin"  editorDataField="text"> 
            <!--editorDataField="selectedDate" itemRenderer="com.adobe.Quivus.view.controls.custom.itemRenderer.DateRenderer4DG">-->

            <!--<mx:itemEditor>
                <fx:Component>
                    <components:LabelDateField width="100%" editable="true" text="{outerDocument.id_DateAdmin.text}"
                                  selectableRange="{{rangeEnd : new Date()}}" />
                </fx:Component>
            </mx:itemEditor>-->
        </mx:DataGridColumn>                    
        <mx:DataGridColumn dataField="ImmunizationType.ImmunizationTypeName" width="120" headerText="Immunization" editorDataField="editorText" itemRenderer="mx.controls.Label">
            <mx:itemEditor>
                <fx:Component>
                    <itemEditors:SparkComboBoxItemEditor dataProvider="{outerDocument.model.immunizationTypeDTOList}" labelField="ImmunizationTypeName" width="120"/>
                </fx:Component>
            </mx:itemEditor>
        </mx:DataGridColumn>
        <mx:DataGridColumn dataField="Dose" headerText="Dose" width="50" editorDataField="editorText">
            <mx:itemEditor>
                <fx:Component>
                    <!--<VBImmunization:ImmunizationItemEditor dataProvider="{outerDocument.model.immunizationDoseList}" immunizationField="Dose" width="100%"/>
                    -->
                    <itemEditors:SparkComboBoxItemEditor dataProvider="{outerDocument.model.immunizationDoseList}" labelField="Dose" width="50" height="100%"/>
                    </fx:Component>
            </mx:itemEditor>
        </mx:DataGridColumn>
        <mx:DataGridColumn dataField="LotNumber" headerText="Lot#" width="50" editorDataField="editorText">
            <mx:itemEditor>
                <fx:Component>
                    <itemEditors:SparkComboBoxItemEditor dataProvider="{outerDocument.model.immunizationLotNumberList}" labelField="LotNumber" width="50"/>
                </fx:Component>
            </mx:itemEditor>
        </mx:DataGridColumn>
        <mx:DataGridColumn headerText="Next Due" width="50"  dataField="NextDoseDue" editable="true" editorDataField="text"> <!-- editorDataField="selectedDate" itemRenderer="com.adobe.Quivus.view.controls.custom.itemRenderer.DateRenderer4DG">-->
            <!--<mx:itemEditor>
                <fx:Component>
                    <components:LabelDateField width="100%" editable="true" text="{outerDocument.id_NextDue.text}" />
                </fx:Component>
            </mx:itemEditor>-->
        </mx:DataGridColumn>
        <!--<mx:DataGridColumn dataField="VisitStatus" headerText="Status" itemRenderer="com.adobe.Quivus.view.controls.custom.itemRenderer.DateRenderer4DG" />-->
        <commons:DataGridColumnEx width="85" headerText="" editable="false" data="{deleteColumnData}" dataField="Note" property="PatientImmunizationId" section="{QIPopUpManager.IMMUNIZATION}" itemRenderer="com.adobe.Quivus.view.controls.custom.patientExamView.quickInput.commons.DeleteRecordRenderer" />
    </mx:columns> 
</mx:DataGrid>

提前致谢

please tell me somebody that, How i find that an item is edited complete in data grid in Flex ?

Actually i am using Flex 4 and develop application for AIR, I need to make an editable grid. all of my custom made editor is work but the native textinput type editor is not working.

Here is my complete code.

The third and last datagridcolumn is not update values when i edit it.

<mx:DataGrid id="id_RecentPatientGrid" includeInLayout="{includeGridInLayout}" visible="{includeGridInLayout}"
             rowCount="{id_RecentPatientGrid.dataProvider.length + 1}"
             width="100%" verticalScrollPolicy="off"
             editable="true"
             itemEditBegin="recentPatientGridItemEditBeginHandler(event)" 
             itemEditEnd="recentPatientGridItemEditEndHandler(event)"
             dataProvider="{immunizationCollection}" draggableColumns="false"  useRollOver="false"
             sortableColumns="false" fontFamily="Verdana" verticalGridLines="false"                 
             styleName="QIGrid"  
             headerStyleName="QIGridHeader" 
             headerBackgroundSkin="com.adobe.Quivus.view.controls.skins.dataGridSkins.DataGridHeaderBlueSkin"
             headerSeparatorSkin="com.adobe.Quivus.view.controls.skins.dataGridSkins.DatagridHeaderSeparatorSkin">
    <!--headerBackgroundSkin="com.adobe.Quivus.view.controls.skins.dataGridSkins.dataGridHeaderSkin"-->
    <mx:columns>
        <!-- Changes by baber waqas for displaying serial number  -->   
        <mx:DataGridColumn headerText="Sr.#"       width="50" editable="false" labelFunction="displayRowNum" />
        <mx:DataGridColumn headerText="Visit Date" width="50" editable="false" labelFunction="displayVisitDate" />
        <mx:DataGridColumn headerText="Date Admin" width="60" editable="true"  dataField="DateAdmin"  editorDataField="text"> 
            <!--editorDataField="selectedDate" itemRenderer="com.adobe.Quivus.view.controls.custom.itemRenderer.DateRenderer4DG">-->

            <!--<mx:itemEditor>
                <fx:Component>
                    <components:LabelDateField width="100%" editable="true" text="{outerDocument.id_DateAdmin.text}"
                                  selectableRange="{{rangeEnd : new Date()}}" />
                </fx:Component>
            </mx:itemEditor>-->
        </mx:DataGridColumn>                    
        <mx:DataGridColumn dataField="ImmunizationType.ImmunizationTypeName" width="120" headerText="Immunization" editorDataField="editorText" itemRenderer="mx.controls.Label">
            <mx:itemEditor>
                <fx:Component>
                    <itemEditors:SparkComboBoxItemEditor dataProvider="{outerDocument.model.immunizationTypeDTOList}" labelField="ImmunizationTypeName" width="120"/>
                </fx:Component>
            </mx:itemEditor>
        </mx:DataGridColumn>
        <mx:DataGridColumn dataField="Dose" headerText="Dose" width="50" editorDataField="editorText">
            <mx:itemEditor>
                <fx:Component>
                    <!--<VBImmunization:ImmunizationItemEditor dataProvider="{outerDocument.model.immunizationDoseList}" immunizationField="Dose" width="100%"/>
                    -->
                    <itemEditors:SparkComboBoxItemEditor dataProvider="{outerDocument.model.immunizationDoseList}" labelField="Dose" width="50" height="100%"/>
                    </fx:Component>
            </mx:itemEditor>
        </mx:DataGridColumn>
        <mx:DataGridColumn dataField="LotNumber" headerText="Lot#" width="50" editorDataField="editorText">
            <mx:itemEditor>
                <fx:Component>
                    <itemEditors:SparkComboBoxItemEditor dataProvider="{outerDocument.model.immunizationLotNumberList}" labelField="LotNumber" width="50"/>
                </fx:Component>
            </mx:itemEditor>
        </mx:DataGridColumn>
        <mx:DataGridColumn headerText="Next Due" width="50"  dataField="NextDoseDue" editable="true" editorDataField="text"> <!-- editorDataField="selectedDate" itemRenderer="com.adobe.Quivus.view.controls.custom.itemRenderer.DateRenderer4DG">-->
            <!--<mx:itemEditor>
                <fx:Component>
                    <components:LabelDateField width="100%" editable="true" text="{outerDocument.id_NextDue.text}" />
                </fx:Component>
            </mx:itemEditor>-->
        </mx:DataGridColumn>
        <!--<mx:DataGridColumn dataField="VisitStatus" headerText="Status" itemRenderer="com.adobe.Quivus.view.controls.custom.itemRenderer.DateRenderer4DG" />-->
        <commons:DataGridColumnEx width="85" headerText="" editable="false" data="{deleteColumnData}" dataField="Note" property="PatientImmunizationId" section="{QIPopUpManager.IMMUNIZATION}" itemRenderer="com.adobe.Quivus.view.controls.custom.patientExamView.quickInput.commons.DeleteRecordRenderer" />
    </mx:columns> 
</mx:DataGrid>

Thanks in Advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

掌心的温暖 2024-12-04 22:05:52

只需做一些事情:

<components:LabelDateField id="df" 
                           width="100%" editable="true" 
                           text="{outerDocument.id_DateAdmin.text}"
                           selectableRange="{{rangeEnd : new Date()}}" 
                           change="{outerDocument.id_DateAdmin.text = df.selectedDate}"/>

Just do something as:

<components:LabelDateField id="df" 
                           width="100%" editable="true" 
                           text="{outerDocument.id_DateAdmin.text}"
                           selectableRange="{{rangeEnd : new Date()}}" 
                           change="{outerDocument.id_DateAdmin.text = df.selectedDate}"/>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文