Apr 21, 2010, 12:05 PM
[CLOSED] Inserted records dissapear after local sort operation
Hello,
after inserting some records in a store and displaying them within a grid which is connected to this store i am trying to perform a sort operation on the grid (by clicking on the grid header - all operations performed locally). All records which were added since last saving the grid get lost then.
I am using Coolite 0.8 latest trunk.
Is this default behaviour ?
However, as a workaround I would like to display a confirmation message BEFORE the user performs a sort operation on the grid. If the user clicks "yes" then sorting should be performed otherwise it has to be canceled.
I couldn`t find any event that could help me.
Do you have any ideas how to archieve this ? Please help me, thank you very much !
Thx,
Peter
after inserting some records in a store and displaying them within a grid which is connected to this store i am trying to perform a sort operation on the grid (by clicking on the grid header - all operations performed locally). All records which were added since last saving the grid get lost then.
<ext:Store runat="server" ID="_storeAddress" AutoLoad="True">
<Reader>
<ext:JsonReader>
<Fields>
<ext:RecordField Name="ID" />
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
<ext:GridPanel ID="_addressEntryGrid" runat="server" StoreID="_storeAddress" Title="Addresseinträge" AutoScroll="True" AutoHeight="True" ButtonAlign="Center" ClicksToEdit="2" StripeRows="True" TrackMouseOver="True" EnableColumnHide="False" EnableColumnMove="False" AutoWidth="True" AutoExpandColumn="ID">
<ColumnModel ID="_addressEntryColumnModel" runat="server">
<Columns>
<ext:Column ColumnID="ID" Header="ID" DataIndex="ID" Width="120">
</ext:Column>
</Columns>
</ColumnModel>
<LoadMask ShowMask="true" />
<SelectionModel>
<ext:RowSelectionModel ID="_addressEntrySelectionModel" runat="server" SingleSelect="true">
</ext:RowSelectionModel>
</SelectionModel>
<View>
<ext:GridView runat="server" ID="_addressEntryGridView" />
</View>
</ext:GridPanel>
<script type="text/javascript">
function CreateAddressEntryRecord() {
// Insert record - call it to insert test record
var grid = Ext.getCmp('<%=addressEntryGrid.ClientID%>').getValue();
var rec =
{
ID: 0
};
grid .insertRecord(0, rec);
}
</script>
I am using Coolite 0.8 latest trunk.
Is this default behaviour ?
However, as a workaround I would like to display a confirmation message BEFORE the user performs a sort operation on the grid. If the user clicks "yes" then sorting should be performed otherwise it has to be canceled.
I couldn`t find any event that could help me.
Do you have any ideas how to archieve this ? Please help me, thank you very much !
Thx,
Peter