PageSize problem

  1. #1

    PageSize problem

    Hi

    I'm using a DataView which I have attached a PagingToolbar to which works fine if I populate data in code behind like this:

    public void Initialise(IEnumerable data)
    {
            DataView1.GetStore().Data = data;
    }
    But if I populate using a PageProxy with a DirectMethod then the pagesize is ignored and all records are shown?

    [DirectMethod]
            public object GetData()
            {
                using (QuoteController qc = new QuoteController())
                {
                    var quotes = qc.GetUpcomingQuotes(20);
                    List<object> q = new List<object>();
    
                    foreach (QuotePickList pl in quotes)
                    {
                        q.Add(new
                        {
                            Type = 2,
                            Title = pl.QuoteId + " - " + pl.Name,
                            Dates = pl.StartDate.Value.ToString("dd MMM yy") + " - " + pl.CompletionDate.Value.ToString("dd MMM yy"),
                            Assigned = 0f,
                            pl.Required,
                            Percentage = pl.ChanceWinning
                        });
                    }
                    return q;
                }
            }

    Here is my markup

    
    <ext:DataView ID="DataView1" 
                    runat="server"
                    OverItemCls="x-view-over"
                    TrackOver="true"
                    
                    ItemSelector="div.gridRow">
                    <Store>
                        <ext:Store ID="storeView" runat="server" PageSize="5">
                            <Model>
                                <ext:Model ID="Model1" runat="server">
                                    <Fields>
                                        <ext:ModelField Name="Type" Type="Int" />
                                        <ext:ModelField Name="Title" />      
                                        <ext:ModelField Name="Dates" />
                                        <ext:ModelField Name="Assigned" Type="Float" />
                                        <ext:ModelField Name="Required" Type="Float" />
                                        <ext:ModelField Name="Percentage" Type="Float" />
                                    </Fields>
                                </ext:Model>
                            </Model>
                            <Proxy>
                                <ext:PageProxy DirectFn="App.direct.GetData" />
                            </Proxy>
                        </ext:Store>
                    </Store>
                    <Tpl ID="Tpl1" runat="server">
                        <Html>
                            <tpl for=".">
                                <div class="gridRow">
                                    <div class="topRow"><a class="description" href="#">{Title}</a></div>
                                    <dl><dt><span class="icon icon-calendar"></span></dt><dd>{Dates}</dd><dt><span class="icon icon-personell-required"></span></dt><dd>{Required}</dd><dt><span class="icon icon-personell-added"></span></dt><dd>{Assigned}</dd><dt></dt><dd><div class="progressBar">
                                    <div id="progressInner" runat="server" style="width:{Percentage}px" class="progressBar-inner"></div></div></dd></dl>
                                </div>
                            </tpl>
                            <div class="x-clear"></div>        
                        </Html>
                    </Tpl>      
                                      
                </ext:DataView>
                <ext:PagingToolbar ID="PagingToolbar1" runat="server" StoreID="storeView" HideRefresh="true" />
    Is there something I need to do to ensure that the PageSize property in the Store is adhered to?

    Thanks
    Glen
  2. #2

    Solved own answer

    Just in case some one else reads this and wants to know the answer.....


    It is - RemotePaging = false

Similar Threads

  1. Replies: 4
    Last Post: Jan 02, 2013, 7:06 AM
  2. Replies: 0
    Last Post: Jun 11, 2012, 2:59 AM
  3. Ext:PagingToolbar & ComboBox PageSize
    By cwolcott in forum 2.x Help
    Replies: 2
    Last Post: Mar 19, 2012, 9:55 PM
  4. Dynamically changing PagingToolBar's PageSize
    By r_honey in forum 1.x Help
    Replies: 8
    Last Post: Jan 22, 2009, 7:26 AM
  5. [CLOSED] gridpanel pagesize
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Dec 11, 2008, 7:20 AM

Posting Permissions