[CLOSED] gridpanel with remote paging maintain textfield/ numeric field values

  1. #1

    [CLOSED] gridpanel with remote paging maintain textfield/ numeric field values

    Hi,
    I have a gridpanel to which I have applied remote paging.
    In the gridpanel there are columns have editors as textfield / numericfield.
    When I edit a cell value and move to another page the changed value is lost.
    How to retain the control values while paging
    Mine is a Razor view engine application.
    Last edited by Daniil; Oct 04, 2013 at 6:06 AM. Reason: [CLOSED]
  2. #2
    Hi @PriceRightHTML5team,

    The following happens.

    1. The Store loads the current page's records from the server.

    2. A user edits something.

    3. A user change the current page - the Store loads the new records from the server. The previously loaded records go away.

    4. A user moves to the previous page - the Store loads the records from the server again.

    The only way to maintain the changes - save it before changing the page.

    There is a Store's WarningOnDirty option which warns a user about it.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <%@ Import Namespace="System.Collections.Generic" %>
    
    <script runat="server">
        public List<object> MyData = new List<object> 
        { 
            new { test = "test1" },
            new { test = "test2" },
            new { test = "test3" },
            new { test = "test4" },
            new { test = "test5" },
            new { test = "test6" },
            new { test = "test7" },
            new { test = "test8" },
            new { test = "test9" }
        };
    
        protected void Store_ReadData(object sender, StoreReadDataEventArgs e)
        {
            List<object> data = this.MyData;
            var limit = e.Limit;
            if ((e.Start + e.Limit) > data.Count)
            {
                limit = data.Count - e.Start;
            }
            List<object> rangeData = (e.Start < 0 || limit < 0) ? data : data.GetRange(e.Start, limit);
            e.Total = data.Count;
            (sender as Store).DataSource = rangeData;
        }
    </script>
    
    <!DOCTYPE html>
    
    <html>
    <head runat="server">
        <title>Ext.NET v2 Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:GridPanel ID="GridPanel1" runat="server">
                <Store>
                    <ext:Store 
                        runat="server" 
                        OnReadData="Store_ReadData"
                        PageSize="3"
                        WarningOnDirty="true">
                        <Model>
                            <ext:Model runat="server">
                                <Fields>
                                    <ext:ModelField Name="test" />
                                </Fields>
                            </ext:Model>
                        </Model>
                        <Proxy>
                            <ext:PageProxy>
                                <Reader>
                                    <ext:JsonReader />
                                </Reader>
                            </ext:PageProxy>
                        </Proxy>
                    </ext:Store>
                </Store>
                <ColumnModel runat="server">
                    <Columns>
                        <ext:Column runat="server" Text="Test" DataIndex="test">
                            <Editor>
                                <ext:TextField runat="server" />
                            </Editor>
                        </ext:Column>
                    </Columns>
                </ColumnModel>
                <BottomBar>
                    <ext:PagingToolbar runat="server" />
                </BottomBar>
                <Plugins>
                    <ext:CellEditing runat="server" />
                </Plugins>
            </ext:GridPanel>
        </form>
    </body>
    </html>

Similar Threads

  1. [CLOSED] gridpanel with local paging. Maintain checkbox selection while paging
    By PriceRightHTML5team in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Sep 20, 2013, 10:20 AM
  2. Replies: 0
    Last Post: Dec 04, 2011, 2:28 PM
  3. GridPanel Remote Paging Problem
    By zhangjiagege in forum 1.x Help
    Replies: 6
    Last Post: Nov 22, 2011, 8:17 AM
  4. [CLOSED] Numeric Values in Row Editor
    By ljcorreia in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Aug 17, 2011, 1:32 PM
  5. [CLOSED] Remote paging GridPanel
    By idrissb in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Jan 21, 2010, 11:17 AM

Tags for this Thread

Posting Permissions