Gridpanel paging bug

  1. #1

    Gridpanel paging bug

    <script type="text/javascript">
            function setPageSize(item) {
                var size = parseInt(item.getValue());
                if (size == 0)
                {
                    var height = Viewport_Main.getHeight();
                    var oneRowHeight = 24;
                    size = Math.floor(height / oneRowHeight) - 4;
                }
                PagingToolbar.pageSize = size; 
                PagingToolbar.doLoad();
            }
    </script>
    
    <ext:PagingToolbar ID="PagingToolbar" runat="server" PageSize="30" StoreID="Store_Main" DisplayInfo="false" Height="24">
                                                <Items>
                                                    <ext:ToolbarSeparator />
                                                    <ext:Label ID="Label1" runat="server" Text="每页显示:" />
                                                    <ext:ToolbarSpacer ID="ToolbarSpacer1" runat="server" Width="10" />
                                                    <ext:ComboBox ID="ComboBox1_PageSize" runat="server" Width="50" Editable="true">
                                                        <Items>
                                                            <ext:ListItem Text="auto" Value="0" />
                                                            <ext:ListItem Text="20" />
                                                            <ext:ListItem Text="30" />
                                                            <ext:ListItem Text="40" />
                                                            <ext:ListItem Text="50" />
                                                            <ext:ListItem Text="60" />
                                                            <ext:ListItem Text="70" />
                                                            <ext:ListItem Text="80" />
                                                            <ext:ListItem Text="90" />
                                                            <ext:ListItem Text="100" />
                                                        </Items>
                                                        <SelectedItem Value="30" />
                                                        <Listeners>
                                                            <Select Handler="setPageSize(item);" />
                                                        </Listeners>
                                                    </ext:ComboBox>
    </ext:PagingToolbar>
    When I select any item, e.g 20, the store is reload, but grid show 19 row only(1-19), lost the 20th, when select item 30, show 1-29, lost one, and I press next button, show 31-60, and I press prev button, show 1-30, the lost record comeback, why? I check html source in IE9, the lost record i found, but don't show in grid.

    version: ext.net 1.30
    Last edited by Daniil; Mar 30, 2012 at 2:13 PM. Reason: Please use [CODE] tags
  2. #2
    Hi,

    How is the Store configured?

    Could you provide a full sample to reproduce the problem?
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi,

    How is the Store configured?

    Could you provide a full sample to reproduce the problem?
    Sorry, isn't bug. My GridPanel is remote paging, in the Store OnRefreshData function, normal, e.Start is zero, but fire by
    PagingToolbar.doLoad()
    , e.Start is -1. I solve it by following code:
    string start = e.Start.ToString();
    if( start == "-1" )
        start = "0";
    Last edited by Daniil; Apr 09, 2012 at 7:58 AM. Reason: Please use [CODE] tags

Similar Threads

  1. GridPanel grouping and paging
    By milenios in forum 2.x Help
    Replies: 4
    Last Post: Aug 13, 2012, 9:14 PM
  2. GridPanel Paging with PageProxy
    By jigpatel06 in forum 1.x Help
    Replies: 3
    Last Post: Mar 11, 2011, 10:33 AM
  3. Paging in GridPanel
    By Rakeshkumar.a in forum 1.x Help
    Replies: 1
    Last Post: Nov 29, 2010, 4:54 PM
  4. Paging GridPanel
    By marcmvc in forum 1.x Help
    Replies: 2
    Last Post: Jul 21, 2010, 10:28 PM
  5. GridPanel Paging
    By Yannis in forum 1.x Help
    Replies: 3
    Last Post: Jun 30, 2010, 11:27 PM

Posting Permissions