开发者

How i find that an item is edited complete in data grid in Flex?

开发者 https://www.devze.com 2023-03-26 00:29 出处:网络
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

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%"/>
                    -->
  开发者_Python百科                  <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


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}"/>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号