Jul 07, 2009, 8:57 AM
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>