[FIXED] [#715] LiveSearchGridPanel doesn't work with a buffered GridPanel

Page 2 of 3 FirstFirst 123 LastLast
  1. #11
    <%@ Page Language="vb" %>
    
    <%@ Import Namespace="System.Data" %>
    <%@ Import Namespace="System.Collections.Generic" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
    
        
        Protected Sub GridFill(sender As Object, e As StoreReadDataEventArgs)
    
            Dim store As Store = DirectCast(sender, Store)
            store.Data = TestData(100)
    
        End Sub
        
    
        
        Private Function TestData(count As Integer) As Object()
            Dim firstNames As String() = New String() {"Russel", "Clark", "Steve", "Sam", "Lance", "Robert", _
                "Sean", "David", "Justin", "Nicolas", "Brent"}
            Dim lastNames As String() = New String() {"Wood", "Lewis", "Scott", "Parker", "Ross", "Garcia", _
                "Bell", "Kelly", "Powell", "Moore", "Cook"}
    
            Dim ratings As Integer() = New Integer() {1, 2, 3, 4, 5}
            Dim salaries As Integer() = New Integer() {100, 400, 900, 1500, 1000000}
    
            Dim data As Object() = New Object(count - 1) {}
            Dim rnd As New Random()
    
            For i As Integer = 0 To count - 1
                Dim ratingId As Integer = rnd.[Next](ratings.Length)
                Dim salaryId As Integer = rnd.[Next](salaries.Length)
                Dim firstNameId As Integer = rnd.[Next](firstNames.Length)
                Dim lastNameId As Integer = rnd.[Next](lastNames.Length)
    
                Dim rating As Integer = ratings(ratingId)
                Dim salary As Integer = salaries(salaryId)
                Dim name As String = [String].Format("{0} {1}", firstNames(firstNameId), lastNames(lastNameId))
                Dim id As String = "rec-" & i
    
                data(i) = New Object() {id, name, rating, salary}
            Next
    
            Return data
        End Function
    
    
    </script>
    
    
    <!DOCTYPE html>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    
    </head>
    <body>
        <form id="form1" runat="server">
            <ext:ResourceManager ID="ResourceManager1" runat="server" Locale="sr" />
    
            <ext:Viewport runat="server" Layout="BorderLayout">
                <Items>
                    <ext:Panel
                        runat="server"
                        Region="Center"
                        Split="true"
                        Layout="FitLayout"
                        Collapsible="false">
                        <Items>
                            <ext:GridPanel
                                ID="Grid"
                                runat="server"
                                Region="Center">
                                <TopBar>
                                    <ext:Toolbar runat="server" EnableOverflow="true">
                                        <Items>
                                            <ext:LiveSearchToolbar runat="server" Flat="True" >
                                            </ext:LiveSearchToolbar>
                                        </Items>
                                    </ext:Toolbar>
                                </TopBar>
                                <BottomBar>
                                    <ext:StatusBar ID="StatusBar1" runat="server" DefaultText=" " >
                                    </ext:StatusBar>
                                </BottomBar>
                                <Store>
                                    <ext:Store ID="Store" runat="server" OnReadData="GridFill">
                                        <Sorters>
                                            <ext:DataSorter Property="name" />
                                        </Sorters>
                                        <Proxy>
                                            <ext:PageProxy>
                                                <Reader>
                                                    <ext:JsonReader RootProperty="data" />
                                                </Reader>
                                            </ext:PageProxy>
                                        </Proxy>
                                        <Model>
                                            <ext:Model runat="server" ID="GridModel" IDProperty="ID">
                                                <Fields>
                                                    <ext:ModelField Name="id" />
                                                    <ext:ModelField Name="name" SortType="AsUCString" />
                                                    <ext:ModelField Name="rating" Type="Int" />
                                                    <ext:ModelField Name="salary" Type="Float" />
                                                </Fields>
                                            </ext:Model>
                                        </Model>
                                    </ext:Store>
                                </Store>
                                <ColumnModel>
                                    <Columns>
                                        <ext:RowNumbererColumn
                                            runat="server"
                                            Width="40"
                                            Sortable="false" />
                                        <ext:Column
                                            runat="server"
                                            Text="Name"
                                            Flex="1"
                                            DataIndex="name">
                                            <Filter>
                                                <ext:StringFilter />
                                            </Filter>
                                        </ext:Column>
                                        <ext:NumberColumn
                                            runat="server"
                                            Text="Rating"
                                            Width="125"
                                            DataIndex="rating" >
                                            <Filter>
                                                <ext:NumberFilter EmptyText="Unesite vrednost..." />
                                            </Filter>
                                        </ext:NumberColumn>
                                        <ext:NumberColumn
                                            runat="server"
                                            Text="Salary"
                                            Width="125"
                                            DataIndex="salary"
                                            Align="Right">
                                            <Renderer Format="UsMoney" />
                                            <Filter>
                                                <ext:NumberFilter EmptyText="Unesite vrednost..." />
                                            </Filter>
                                        </ext:NumberColumn>
                                    </Columns>
                                </ColumnModel>
                                <SelectionModel>
                                    <ext:RowSelectionModel runat="server" Mode="Single">
                                    </ext:RowSelectionModel>
                                </SelectionModel>
                                <Plugins>
                                    <ext:GridFilters runat="server" />
                                    <ext:LiveSearchGridPanel runat="server">
                                        <Listeners>
                                            <RegExpError Handler="App.StatusBar1.setStatus({text: message, iconCls: 'x-status-error'});" />
                                            <BeforeSearch Handler="App.StatusBar1.setStatus({text: '', iconCls: ''});" />
                                            <Search Handler="if(count>0) {App.StatusBar1.setStatus({text: count + ' items found.', iconCls: 'x-status-valid'});}" />
                                        </Listeners>
                                    </ext:LiveSearchGridPanel>
                                    <ext:BufferedRenderer runat="server" />
                                </Plugins>
                            </ext:GridPanel>
                        </Items>
                    </ext:Panel>
                </Items>
            </ext:Viewport>
    
    
        </form>
    </body>
    </html>
  2. #12
    Thank you for the test case. It appears that a LiveSearchGridPanel cannot work with a buffered GridPanel.

    Created an Issue.

    I've also found a bug report in the Sencha forums.

    If turn off a buffered rendering for GridPanel - BufferedRenderer="false", then it appears to be working well.
    Last edited by Daniil; Feb 16, 2015 at 6:41 AM.
  3. #13
    What is the status of this problem? I see that is not fixed in 3.2.0.
  4. #14
    I see the Sencha thread has been marked as fixed in ExtJS 6.0.0. So, most likely, the fix will appear in the next major version of Ext.NET which will be based on ExtJS 6. No time frame, but we are considering to make a release in this year.
  5. #15
    You mean that will be fixed in Ext.Net 4? Then we must buy new version? Well I don't have 3500 usd for new version :(
  6. #16
    Seems I cannot reproduce the issue with Ext.NET 3.2.0. Can you reproduce?
  7. #17
    I tried on example in this thread, when search some string it don't find all items.

    Try to reduce size of browser to fit in grid 15-20 items. Then search some string (for example "cook" or "moore"). It will say that it found for example 5 items. Scroll down and you find more than that. Somehow it don't see all items.
  8. #18
    Please clarify have you had a look inside the LiveSearchGridPanel plugins's sources? You are an experienced Ext.NET developer, I think you might be able to fix it. We and all the community would appreciate a fix a lot.
  9. #19
    Well I'm not that experienced. I just know how to place controls on page and write code behind. If something don't work, I don't know how to fix it. Even if I look at souce code (which don't have and don't know where is it), I guess that's beyond my capabilities :(
  10. #20
    There is a technical problem. LiveSearchGridPanel deals with rendered rows. Buffer rendering (which is by default) means that not all the rows are rendered. I am afraid we won't be able to get it working for buffer rendering before update to ExtJS 6.

    Please clarify is it not an option for you to turn off buffer rendering?
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. [CLOSED] getHeight() on BeforeRender event for GridPanel doesn't work.
    By kevinhwang in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Sep 10, 2013, 4:03 AM
  2. GridPanel Filter example DateFilter doesn't work
    By jwhitmire36 in forum 2.x Help
    Replies: 2
    Last Post: Jan 09, 2013, 9:24 PM
  3. GridPanel Renderer doesn' work
    By AlexMaslakov in forum 1.x Help
    Replies: 2
    Last Post: Aug 25, 2011, 12:46 PM
  4. [CLOSED] [1.0] GridPanel nested in a Panel doesn't work
    By PoloTheMonk in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Dec 18, 2009, 8:16 PM
  5. GridPanel AutoScroll doesn't work when empty
    By dbassett74 in forum 1.x Help
    Replies: 2
    Last Post: May 24, 2009, 11:03 PM

Posting Permissions