Data in control not stored when focus lost

  1. #1

    Data in control not stored when focus lost


    Coolite version 0.8.1


    While working with ext:DataGrid and columns that contain an ext:DateField or an ext:Combobox I detected a strange behaviour:

    Entering a date in the date picker or selecting an item in the drop down list of the combobox and clicking then directly on the save button in the datagrid was not storing the value of that last edited column.

    The Json string transferred to the controller during the save process then had a null value instead of the expected value, though the value was visible in the data grid.

    I assume that the control does not store the value when it loses the focus.

    On the other hand the data are transferred correctely when I leave the field with tab or click in an other column of the same row.

    I can reproduce this behaviour every time.

    Best regards,

    Hans


    Definition of the datagrid columns
    
                        <ext:Column ColumnID="DiscontinuedDate" DataIndex="DiscontinuedDate" Header="Discontinued Date" >
    
                           <Renderer Fn="formatDateTime" />
    
                           <Editor>
    
                                <ext:DateField ID="DiscontinuedDateDateField" runat="server"  />
    
                            </Editor>
    
                        </ext:Column>
    
                        <ext:Column ColumnID="ProductSubcategoryID"
    DataIndex="ProductSubcategoryID" Header="Product Subcategory">
    
                            <Renderer Fn="productSubcategoryRenderer" />
    
                            <Editor>                        
    
                                <ext:ComboBox 
    
                                ID="ProductSubcategoryIDComboBox" 
    
                                runat="server" 
    
                                Editable="false"
    
                                Shadow="Drop" 
    
                                TypeAhead="true"
    
                                Mode="Local" 
    
                                TriggerAction="All" 
    
                                ForceSelection="true"
    
                                EmptyText="Auswählen..."
    
                                ValueNotFoundText="Laden..."
    
                                StoreID="ProductSubcategoriesStore"
    
                                DisplayField="Name" 
    
                                ValueField="ProductSubcategoryID">
    
                                </ext:ComboBox>
    
                            </Editor>
    
                        </ext:Column>
    Definition of the save button.
                    <ext:Toolbar ID="TopProductsToolbar" runat="server">
                        <Items>
                            <ext:Button ID="SaveProductsButton" runat="server" Text="Speichern" Icon="Disk">
                                <Listeners>
                                    <Click  Fn="saveHandler" />
                                </Listeners>
                            </ext:Button>
  2. #2

    RE: Data in control not stored when focus lost

    Hi,

    Try to call in your 'saveHandler' (call it before saving)
    grid.stopEditing(false);

Similar Threads

  1. Replies: 1
    Last Post: Dec 01, 2011, 11:34 AM
  2. Replies: 1
    Last Post: Nov 28, 2011, 2:40 PM
  3. How to get row focus/selection lost event?
    By reezvi in forum 1.x Help
    Replies: 10
    Last Post: Jul 31, 2011, 8:41 PM
  4. Replies: 4
    Last Post: Jul 01, 2011, 5:05 PM
  5. [CLOSED] Filter focus lost after grid refresh
    By yobnet in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Sep 15, 2010, 9:36 AM

Posting Permissions