Oct 20, 2010, 9:33 PM
[CLOSED] GridPanel with dynamic columns lost values after reload data
Hi,
I've got a problem with the GridPanel. I have some columns added from the CodeBehind, and I make the Databind with a Data Table.
The problem is that when I save the data (new data that was added or old data that was edited) the values of these dynamic columns are lost.
If I set the RefreshAfterSaving="Always" property in the store, those values are lost. Buy if I don't set that property, the changes in other records of the store aren't updated.
It's too code to attach all
Store
I've got a problem with the GridPanel. I have some columns added from the CodeBehind, and I make the Databind with a Data Table.
The problem is that when I save the data (new data that was added or old data that was edited) the values of these dynamic columns are lost.
If I set the RefreshAfterSaving="Always" property in the store, those values are lost. Buy if I don't set that property, the changes in other records of the store aren't updated.
It's too code to attach all
Store
<ext:Store runat="server" ID="stMonthlyDetail" OnRefreshData="stMonthlyDetail_RefreshData" RefreshAfterSaving="Always">
<Reader>
<ext:JsonReader IDProperty="ID">
<Fields>
<ext:RecordField Name="ID" />
<ext:GridPanel ID="grdMonthlyDetails" runat="server" ClicksToEdit="1" StoreID="stMonthlyDetail" MonitorResize="true" MonitorWindowResize="true"
TrackMouseOver="true"
<ext:Button ID="btnSaveTop" runat="server" Text="Save" Disabled="true" StandOut="true" Icon="Disk" OnClientClick="#{btnSaveTop}.disable();" ToolTip="Save changes">
<DirectEvents>
<Click Delay="100" OnEvent="btnSave_Click" Failure="Ext.MessageBox.alert(strSaveErrorMessage , result.errorMessage);#{btnSaveTop}.enable();"
Success="#{grdMonthlyDetails}.save();#{btnSaveTop}.enable();Ext.MessageBox.alert(strSaveTitle, strSaveOkMessage);parent.Reload();#{stMonthlyDetail}.commitChanges();closeCurrentWindowIfNoDetails();">
<EventMask ShowMask="true" Target="CustomTarget" Msg="Saving..." CustomTarget="={#{pnlMain}.body}" />
<ExtraParams>
<ext:Parameter Name="gridStore" Encode="false" Value="GetModifiedData()" Mode="Raw" />
</ExtraParams>
</Click>
</DirectEvents>
</ext:Button>
Thanks,
Last edited by Daniil; Oct 25, 2010 at 7:40 PM.
Reason: Marked as [CLOSED]. No more information was provided.