[CLOSED] RemoteSort for buffered store

Page 4 of 5 FirstFirst ... 2345 LastLast
  1. #31
    Please see the code below.
    It seems a bug to me if all the data are in client side.
    And it is related with group summary, for example, two people check the same page with different counts (18 vs 34, neither one is correct) for group 0.

    <%@ Page Language="C#" %>
     
     
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
     
     
    <!DOCTYPE html>
     
     
    <html>
    <head runat="server">
        <title></title>
     
     
        <script runat="server">
            protected void Page_Load(object sender, EventArgs e)
            {
                ResourceManager.GetInstance().RegisterBeforeClientInitScript("window._start = new Date().getTime();");
                 
                var data = new List<object>();
     
     
                for (int i = 0; i < 500; i++)
                {
                    data.Add(new { 
                        Group = i % 10,
                        Value1 = "1_" + i,
                        Value2 = "2_" + i,
                        Value3 = "3_" + i,
                        Value4 = "4_" + i,
                        Value5 = "5_" + i,
                        Value6 = "6_" + i,
                        Value7 = "7_" + i,
                        Value8 = "8_" + i,
                        Value9 = "9_" + i,
                        Value10 = "10_" + i,
                        Value11 = "11_" + i,
                        Value12 = "12_" + i,
                        Value13 = "13_" + i,
                        Value14 = "14_" + i,
                        Value15 = "15_" + i,
                        Value16 = "16_" + i,
                        Value17 = "17_" + i,
                        Value18 = "18_" + i,
                        Value19 = "19_" + i,
                        Value20 = "20_" + i,
                        Value21 = "21_" + i,
                        Value22 = "22_" + i,
                        Value23 = "23_" + i,
                        Value24 = "24_" + i,
                        Value25 = "25_" + i,
                        Value26 = "26_" + i,
                        Value27 = "27_" + i,
                        Value28 = "28_" + i,
                        Value29 = "29_" + i,
                        Value30 = "30_" + i
                    });
                }
     
     
                GridPanel1.GetStore().DataSource = data;
                GridPanel1.GetStore().DataBind();
            }
        </script>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
     
     
            <ext:GridPanel
                ID="GridPanel1"
                runat="server"
                Width="600"
                Height="450"
                Title="Grid"
                Frame="true">
                <Store>
                    <ext:Store runat="server" GroupField="Group" Buffered="true" PageSize="500">                  
                        <Model>
                            <ext:Model runat="server">
                                <Fields>
                                    <ext:ModelField Name="Group" />
                                    <ext:ModelField Name="Value1" />
                                    <ext:ModelField Name="Value2" />
                                    <ext:ModelField Name="Value3" />
                                    <ext:ModelField Name="Value4" />
                                    <ext:ModelField Name="Value5" />
                                    <ext:ModelField Name="Value6" />
                                    <ext:ModelField Name="Value7" />
                                    <ext:ModelField Name="Value8" />
                                    <ext:ModelField Name="Value9" />
                                    <ext:ModelField Name="Value10" />
                                    <ext:ModelField Name="Value11" />
                                    <ext:ModelField Name="Value12" />
                                    <ext:ModelField Name="Value13" />
                                    <ext:ModelField Name="Value14" />
                                    <ext:ModelField Name="Value15" />
                                    <ext:ModelField Name="Value16" />
                                    <ext:ModelField Name="Value17" />
                                    <ext:ModelField Name="Value18" />
                                    <ext:ModelField Name="Value19" />
                                    <ext:ModelField Name="Value20" />
                                    <ext:ModelField Name="Value21" />
                                    <ext:ModelField Name="Value22" />
                                    <ext:ModelField Name="Value23" />
                                    <ext:ModelField Name="Value24" />
                                    <ext:ModelField Name="Value25" />
                                    <ext:ModelField Name="Value26" />
                                    <ext:ModelField Name="Value27" />
                                    <ext:ModelField Name="Value28" />
                                    <ext:ModelField Name="Value29" />
                                    <ext:ModelField Name="Value30" />
                                </Fields>
                            </ext:Model>
                        </Model>
                        <Sorters>
                            <ext:DataSorter Property="Group" Direction="ASC" />
                        </Sorters>
                    </ext:Store>
                </Store>
                <ColumnModel runat="server">
                    <Columns>
    		    <ext:RowNumbererColumn ID="RowNumbererColumn1" runat="server" Width="40" Sortable="false" />
                        <ext:Column runat="server" Text="Group" DataIndex="Group" />
                        <ext:SummaryColumn runat="server" Text="Value1" DataIndex="Value1" SummaryType="Count" Flex="1" />
                        <ext:Column runat="server" Text="Value2" DataIndex="Value2" Flex="1" />
                        <ext:Column runat="server" Text="Value3" DataIndex="Value3" Flex="1" />
                        <ext:Column runat="server" Text="Value4" DataIndex="Value4" Flex="1" />
                        <ext:Column runat="server" Text="Value5" DataIndex="Value5" Flex="1" />
                        <ext:Column runat="server" Text="Value6" DataIndex="Value6" Flex="1" />
                        <ext:Column runat="server" Text="Value7" DataIndex="Value7" Flex="1" />
                        <ext:Column runat="server" Text="Value8" DataIndex="Value8" Flex="1" />
                        <ext:Column runat="server" Text="Value9" DataIndex="Value9" Flex="1" />
                        <ext:Column runat="server" Text="Value10" DataIndex="Value10" Flex="1" />
                        <ext:Column runat="server" Text="Value11" DataIndex="Value11" Flex="1" />
                        <ext:Column runat="server" Text="Value12" DataIndex="Value12" Flex="1" />
                        <ext:Column runat="server" Text="Value13" DataIndex="Value13" Flex="1" />
                        <ext:Column runat="server" Text="Value14" DataIndex="Value14" Flex="1" />
                        <ext:Column runat="server" Text="Value15" DataIndex="Value15" Flex="1" />
                        <ext:Column runat="server" Text="Value16" DataIndex="Value16" Flex="1" />
                        <ext:Column runat="server" Text="Value17" DataIndex="Value17" Flex="1" />
                        <ext:Column runat="server" Text="Value18" DataIndex="Value18" Flex="1" />
                        <ext:Column runat="server" Text="Value19" DataIndex="Value19" Flex="1" />
                        <ext:Column runat="server" Text="Value20" DataIndex="Value20" Flex="1" />
                        <ext:Column runat="server" Text="Value21" DataIndex="Value21" Flex="1" />
                        <ext:Column runat="server" Text="Value22" DataIndex="Value22" Flex="1" />
                        <ext:Column runat="server" Text="Value23" DataIndex="Value23" Flex="1" />
                        <ext:Column runat="server" Text="Value24" DataIndex="Value24" Flex="1" />
                        <ext:Column runat="server" Text="Value25" DataIndex="Value25" Flex="1" />
                        <ext:Column runat="server" Text="Value26" DataIndex="Value26" Flex="1" />
                        <ext:Column runat="server" Text="Value27" DataIndex="Value27" Flex="1" />
                        <ext:Column runat="server" Text="Value28" DataIndex="Value28" Flex="1" />
                        <ext:Column runat="server" Text="Value29" DataIndex="Value29" Flex="1" />
                        <ext:Column runat="server" Text="Value30" DataIndex="Value30" Flex="1" />
                    </Columns>
                </ColumnModel>                       
                <Features>
                    <ext:GroupingSummary ID="GroupingView1" runat="server"  
                            HideGroupedHeader
                            ="false" EnableGroupingMenu="false"
                            GroupHeaderTpl='Group {[values.rows[0].data.Group]}' />
                </Features>
                <View>
                    <ext:GridView runat="server" TrackOver="false" >
                        <Listeners>                    
                            <%--<Refresh Handler="alert((new Date().getTime() - window._start).toString());" />--%>
                        </Listeners>
                    </ext:GridView>
                </View>                   
            </ext:GridPanel>
        </form>
    </body>
    </html>
  2. #32
    Hi,

    Yes, GroupingSummary cannot work correctly with Buffered store (atleast now)
    At this moment, I can suggest to use remote group summary
    https://examples2.ext.net/#/GridPane..._GroupSummary/

    I would consider it as a bug (because all records are presented in client side and summary is able to calculate correctly all values). We should fix the issue before final release
  3. #33
    Sounds good.
    Please let us know when the fixes are checked in SVN.

    Thanks for the help.
  4. #34
    Hi Vladimir,

    I am trying to use remote groupsummary as you suggested.
    And I also do the remote sorting.
    So, I return something like below the Store_RefreshData for OnReadData.

    clientStore.DataSource = new { data, summaryData };
    I also added the following in the store.
     <Proxy>
                 <ext:PageProxy>
                    <Reader>
                        <ext:JsonReader Root="data.data" />
                    </Reader>
                </ext:PageProxy>
             </Proxy>
    I got the following error.
    {serviceResponse:{success:false,message:"System.Ar gumentException: Invalid data source source type. The data source must be of type IListSource, IEnumerable or IDataSource.\r\n at Ext.Net.StoreBase.ValidateDataSource(Object dataSource)\r\n at Ext.Net.StoreBase.set_DataSource(Object value)\r\n at ASP.views_home_index_aspx.Store_RefreshData(Object sender, StoreReadDataEventArgs e) in MvcApplication7\\Views\\Home\\Index.aspx:line 1228\r\n at Ext.Net.Store.OnReadData(StoreReadDataEventArgs e)\r\n at Ext.Net.Store.RaiseAjaxPostBackEvent(String eventArgument)"}}

    Did I miss any setting or it is a bug?
    Plase advise.
  5. #35
    Hi,

    You have to use Data property instead DataSource (like in Examples Explorer sample)
    Difference between Data and DataSource: Data is serialized as is (whole (any) object is serialized using Json.Serialize),
    DataSource property is analyzed and properties are related with fields are listed in Model.Fields collection will be serialized only
  6. #36
    Great, it works.
    Thank you for the explaination as well.

    Can you please let us know what's the time line the local group summary will be fixed?
    And the performance for scroll bar seems still a big problem for us.
  7. #37
    Can you please let us know what's the time line the local group summary will be fixed?
    I am not sure yet, may be 1-2 weeks

    And the performance for scroll bar seems still a big problem for us.
    ExtJS uses browser native scrolling therefore i am doubt that we can improve it (it is a problem on the browser level)
  8. #38
    Quote Originally Posted by Vladimir View Post
    I am not sure yet, may be 1-2 weeks
    Awesome!

    Quote Originally Posted by Vladimir View Post
    ExtJS uses browser native scrolling therefore i am doubt that we can improve it (it is a problem on the browser level)
    I think it is related with the buffer not the browser.
    First of all, if I don't use buffer and once the data loaded, the scrolling bar movement is smoothly.
    Secondly, I am not sure if you notice that the height of scroller for vertical scrolling bar is incorrect (The height is much bigger than the one without buffer, it seems calculated based only on the portional of rows the buffered instead of total rows). My page size is set to 1000 and much bigger than 300 total rows I have and I assume all the rows should be buffered in the local.
  9. #39
    First of all, if I don't use buffer and once the data loaded, the scrolling bar movement is smoothly.
    Buffered grid renders rows on demand (when scrolling is performed) therefore can be some delay (depends from browser javascript engine speed)

    Secondly, I am not sure if you notice that the height of scroller for vertical scrolling bar is incorrect (The height is much bigger than the one without buffer, it seems calculated based only on the portional of rows the buffered instead of total rows). My page size is set to 1000 and much bigger than 300 total rows I have and I assume all the rows should be buffered in the local.
    I am not sure that clear understood, can you provide a sample?
  10. #40
    Quote Originally Posted by Vladimir View Post
    Buffered grid renders rows on demand (when scrolling is performed) therefore can be some delay (depends from browser javascript engine speed)
    I understood, that maybe the root cause of the scrolling bar performance issue.

    Quote Originally Posted by Vladimir View Post
    I am not sure that clear understood, can you provide a sample?
    For example, if the window can show 50 rows and there are total 500 rows, the scroller is 1/10 the height of the scroll bar in normal scenario.
    But in the buffered view, it may be 1/5 or more. I guess it is also related with the same reason above.

    And I was also wondering if there is a way to make the buffer bigger (less on demand rendering) via some setting.
    I tried to set the page size much bigger than the actually data amount, it makes no difference.
Page 4 of 5 FirstFirst ... 2345 LastLast

Similar Threads

  1. [CLOSED] Shared store with buffered grid
    By Justin_Wignall in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Aug 05, 2012, 2:00 PM
  2. Replies: 0
    Last Post: Oct 08, 2011, 8:02 PM
  3. [CLOSED] GridPanel RemoteSort
    By Marcelo in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 28, 2011, 8:12 PM
  4. [CLOSED] ServerMapping and RemoteSort
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Dec 17, 2009, 12:12 PM
  5. [CLOSED] Buffered Grid View Scrolling
    By bethc in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 02, 2009, 7:29 AM

Tags for this Thread

Posting Permissions