[CLOSED] GridPanel with dynamic columns lost values after reload data

  1. #1

    [CLOSED] GridPanel with dynamic columns lost values after reload data


    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

    <ext:Store runat="server" ID="stMonthlyDetail" OnRefreshData="stMonthlyDetail_RefreshData" RefreshAfterSaving="Always">
                    <ext:JsonReader IDProperty="ID">
                            <ext:RecordField Name="ID" />        
    <ext:GridPanel ID="grdMonthlyDetails" runat="server" ClicksToEdit="1" StoreID="stMonthlyDetail" MonitorResize="true" MonitorWindowResize="true"
        <ext:Button ID="btnSaveTop" runat="server" Text="Save" Disabled="true" StandOut="true" Icon="Disk" OnClientClick="#{btnSaveTop}.disable();" ToolTip="Save changes">
                                    <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}" />                                   
                                            <ext:Parameter Name="gridStore" Encode="false" Value="GetModifiedData()" Mode="Raw" />
    Last edited by Daniil; Oct 25, 2010 at 7:40 PM. Reason: Marked as [CLOSED]. No more information was provided.
  2. #2

    Please provide us with these things:
    1. Code of stMonthlyDetail_RefreshData;
    2. btnSave_Click;
    3. GetModifiedData;
    4. Where do you add dynamic columns?

    NOTE: Marked as solved. No more information was provided.
    Last edited by Daniil; Oct 25, 2010 at 7:39 PM. Reason: Added note

Similar Threads

  1. [CLOSED] Reload the gridpanel after using gridfilter, the data lost
    By csssi_coolite in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 07, 2011, 11:27 AM
  2. gridpanel lost data after postback
    By sonnh11 in forum 1.x Help
    Replies: 2
    Last Post: Jun 28, 2011, 10:31 AM
  3. Gridpanel sorting lost upon data rebinding
    By norphos in forum 1.x Help
    Replies: 1
    Last Post: Jun 01, 2011, 6:38 AM
  4. Replies: 0
    Last Post: Feb 10, 2011, 1:04 PM
  5. [FIXED] [V0.8.0] GridPanel data lost
    By methode in forum Bugs
    Replies: 3
    Last Post: Feb 14, 2009, 11:16 AM

Tags for this Thread

Posting Permissions