[CLOSED] Gridpanel Livesearch Plugin Error

Page 1 of 2 12 LastLast
  1. #1

    [CLOSED] Gridpanel Livesearch Plugin Error

    Hi,

    i m using gridpanel with livesearch plugin. but i m facing a fallowing error while using the plugin. please find attached screenshot for the same.

    Click image for larger version. 

Name:	LiveSearchError.jpg 
Views:	26 
Size:	91.1 KB 
ID:	6599
    Attached Thumbnails Click image for larger version. 

Name:	LiveSearchError.png 
Views:	21 
Size:	72.5 KB 
ID:	6597  
    Last edited by Daniil; Aug 06, 2013 at 8:25 AM. Reason: [CLOSED]
  2. #2
    Please provide test sample reproduces the issue
    Also please provide info about what browser do you use
  3. #3
    Quote Originally Posted by Vladimir View Post
    Please provide test sample reproduces the issue
    Also please provide info about what browser do you use
    Hi Vladimir,

    Please find below test sample.

    LivesearchSample.aspx

    <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="LivesearchSample.aspx.vb" Inherits="Ext.Net_Samples_New.LivesearchSample" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!DOCTYPE html>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title>Simple Array Grid - Ext.NET Examples</title>
        <style>
            .x-grid-row-over .x-grid-cell-inner
            {
                font-weight: bold;
            }
        </style>
    
        <script>
            var template = '<span style="color:{0};">{1}</span>';
    
            var change = function (value) {
                return Ext.String.format(template, (value > 0) ? "green" : "red", value);
            };
    
            var pctChange = function (value) {
                return Ext.String.format(template, (value > 0) ? "green" : "red", value + "%");
            };
    
        var StatusRenderer = function (value, st) {
            var ind = st.find("ID", value);
            var r = st.getAt(ind);
            if (Ext.isEmpty(r)) {
                return "";
            }
            return r.data.Name;
        };
        </script>
    
    </head>
    <body>
        <form id="Form1" runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server" />
        <h1>        Simple Array Grid</h1>
        <ext:Store ID="StoreCombo" runat="server">
            <Model>
                <ext:Model ID="Model2" runat="server">
                    <Fields>
                        <ext:ModelField Name="ID" />
                        <ext:ModelField Name="Name" />
                    </Fields>
                </ext:Model>
            </Model>
        </ext:Store>
        <ext:GridPanel ID="GridPanel1" runat="server" Title="Array Grid" Width="1200" Height="600">
            <Store>
                <ext:Store ID="Store1" runat="server">
                    <Model>
                        <ext:Model ID="Model1" runat="server">
                            <Fields>
                                <ext:ModelField Name="company" />
                                <ext:ModelField Name="price" Type="Float" />
                                <ext:ModelField Name="change" Type="Float" />
                                <ext:ModelField Name="pctChange" Type="Float" />
                                <ext:ModelField Name="lastChange" Type="Date" DateFormat="M/d hh:mmtt" />
                            </Fields>
                        </ext:Model>
                    </Model>
                </ext:Store>
            </Store>
            <ColumnModel ID="ColumnModel1" runat="server">
                <Columns>
                    <ext:CheckColumn ID="chkCol" Text = "" DataIndex="" Width = 30 Editable = True/>
                    <ext:Column ID="Column1" runat="server" Text="Company" DataIndex="company" Width="500">
                        <Editor>
                            <ext:TextField ID="txtCol1" runat="server" AllowBlank="false"/>
                        </Editor>
                    </ext:Column>
                    <ext:Column ID="Column2" runat="server" Text="Price" DataIndex="price">
                        <Renderer Format="UsMoney" />
                        <Editor>
                            <ext:TextField ID="TextField1" runat="server" />
                        </Editor>
                    </ext:Column>
                    <ext:Column ID="Column3" runat="server" Text="Change" DataIndex="change">
                        <Renderer Fn="change" />
                        <Editor>
                            <ext:TextField ID="TextField2" runat="server" AllowBlank="false" />
                        </Editor>
                    </ext:Column>
                    <ext:Column ID="Column4" runat="server" Text="Change" DataIndex="pctChange">
                        <Renderer Fn="pctChange" />
                    </ext:Column>
                    <ext:DateColumn ID="DateColumn1" runat="server" Text="Last Updated" DataIndex="lastChange" />
                </Columns>
            </ColumnModel>
            <SelectionModel>
                <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" />
            </SelectionModel>
            <Plugins>
                 <ext:LiveSearchGridPanel ID="LiveSearchGridPanel1" runat="server">
                    <Listeners>
                        <RegExpError Handler="#{StatusBar1}.setStatus({text: message, iconCls: 'x-status-error'});" />
                        <BeforeSearch Handler="#{StatusBar1}.setStatus({text: 'Nothing Found', iconCls: ''});" />
                        <Search Handler="if(count>0){#{StatusBar1}.setStatus({text: count + ' matche(s) found.', iconCls: 'x-status-valid'});}" />
                    </Listeners>
                </ext:LiveSearchGridPanel>
            </Plugins>
            <TopBar>
                <ext:LiveSearchToolbar ID="LiveSearchToolbar1" runat="server">
                    <Items>
                        <ext:ToolbarFill />
                        <ext:Button ID="Button3" runat="server" Text="Refresh" Handler="var p = this.up('gridpanel').liveSearchPlugin; p.search(p.value);" />
                    </Items>
                </ext:LiveSearchToolbar>
            </TopBar>
            <BottomBar>
                <ext:StatusBar ID="StatusBar1" runat="server" DefaultText="Nothing Found" />
            </BottomBar>
        </ext:GridPanel>
        </form>
    </body>
    </html>
    LivesearchSample.aspx.vb

    Imports System.Web.UI.WebControls
    Imports System.Configuration
    
    Imports ext1 = Ext.Net
    Imports Ext.Net
    Imports Ext.Net.JSON
    
    Partial Public Class LivesearchSample
        Inherits System.Web.UI.Page
    
        Dim STRSQL As String
    
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            Me.Store1.DataSource = Me.Data
            Me.Store1.DataBind()
        End Sub
    
        Private ReadOnly Property Data() As Object()
            Get
                Return New Object() {New Object() {"3m Co", 71.72, 0.02, 0.03, "9/1 12:00am"}, New Object() {"Alcoa Inc", 29.01, 0.42, 1.47, "9/1 12:00am"}, New Object() {"Altria Group Inc", 83.81, 0.28, 0.34, "9/1 12:00am"}, New Object() {"American Express Company", 52.55, 0.01, 0.02, "9/1 12:00am"}, New Object() {"American International Group, Inc.", 64.13, 0.31, 0.49, "9/1 12:00am"}, New Object() {"AT&T Inc.", 31.61, -0.48, -1.54, "9/1 12:00am"}, _
                 New Object() {"Boeing Co.", 75.43, 0.53, 0.71, "9/1 12:00am"}, New Object() {"Caterpillar Inc.", 67.27, 0.92, 1.39, "9/1 12:00am"}, New Object() {"Citigroup, Inc.", 49.37, 0.02, 0.04, "9/1 12:00am"}, New Object() {"E.I. du Pont de Nemours and Company", 40.48, 0.51, 1.28, "9/1 12:00am"}, New Object() {"Exxon Mobil Corp", 68.1, -0.43, -0.64, "9/1 12:00am"}, New Object() {"General Electric Company", 34.14, -0.08, -0.23, "9/1 12:00am"}, _
                 New Object() {"General Motors Corporation", 30.27, 1.09, 3.74, "9/1 12:00am"}, New Object() {"Hewlett-Packard Co.", 36.53, -0.03, -0.08, "9/1 12:00am"}, New Object() {"Honeywell Intl Inc", 38.77, 0.05, 0.13, "9/1 12:00am"}, New Object() {"Intel Corporation", 19.88, 0.31, 1.58, "9/1 12:00am"}, New Object() {"International Business Machines", 81.41, 0.44, 0.54, "9/1 12:00am"}, New Object() {"Johnson & Johnson", 64.72, 0.06, 0.09, "9/1 12:00am"}, _
                 New Object() {"JP Morgan & Chase & Co", 45.73, 0.07, 0.15, "9/1 12:00am"}, New Object() {"McDonald""s Corporation", 36.76, 0.86, 2.4, "9/1 12:00am"}, New Object() {"Merck & Co., Inc.", 40.96, 0.41, 1.01, "9/1 12:00am"}, New Object() {"Microsoft Corporation", 25.84, 0.14, 0.54, "9/1 12:00am"}, New Object() {"Pfizer Inc", 27.96, 0.4, 1.45, "9/1 12:00am"}, New Object() {"The Coca-Cola Company", 45.07, 0.26, 0.58, "9/1 12:00am"}, _
                 New Object() {"The Home Depot, Inc.", 34.64, 0.35, 1.02, "9/1 12:00am"}, New Object() {"The Procter & Gamble Company", 61.91, 0.01, 0.02, "9/1 12:00am"}, New Object() {"United Technologies Corporation", 63.26, 0.55, 0.88, "9/1 12:00am"}, New Object() {"Verizon Communications", 35.57, 0.39, 1.11, "9/1 12:00am"}, New Object() {"Wal-Mart Stores, Inc.", 45.45, 0.73, 1.63, "9/1 12:00am"}}
            End Get
        End Property
    End Class
    Note :
    1. As per my understanding this issue occurs in a scenario where i used Checkcolumn in gridpanel.if i remove checkcolumn from the collection then everything works fine.
    2. Another observation is, this error occurs only for the search characters n b s p. i.e &nbsp
    3. i've tested this on IE 9.0 as well as on Crome.
  4. #4
    Hi @hemantpatil,

    I could reproduce the problem with the v2.2 release, but cannot with the latest Ext.NET from SVN trunk. So, it has been fixed at some point. The fix will go to the upcoming v2.3 release.
  5. #5
    Quote Originally Posted by Daniil View Post
    Hi @hemantpatil,

    I could reproduce the problem with the v2.2 release, but cannot with the latest Ext.NET from SVN trunk. So, it has been fixed at some point. The fix will go to the upcoming v2.3 release.
    Hi Daniil,

    i've downloaded the latest SVN also, but the prob. i m facing is i m not able to compile the assemblies from the source, that's why i m using V2.2. i m getting some errors while compiling the source. i m using VS2008. could you please direct me to get the assemblies of Latest SVN trunk..?
  6. #6
    It is a bug, thank you for the report. Fixed in SVN trunk, please update.

    As for already built dlls. There are no built dlls for the SVN trunk. You have to get the sources and build manually. Well, as you did.
  7. #7
    Hi Daniil

    I have the latest trunk and I have a similar error with every empty column, if i Search for n it highlights &nbsp;
    The curious thing is, why does this not happen with the first row of every group??

    I have attached some screens

    Click image for larger version. 

Name:	search and.png 
Views:	13 
Size:	52.5 KB 
ID:	6636
    Click image for larger version. 

Name:	search n.png 
Views:	10 
Size:	53.0 KB 
ID:	6637
    Click image for larger version. 

Name:	search none.png 
Views:	10 
Size:	54.6 KB 
ID:	6638
  8. #8
    Thank you for the report. Here is a simple test case. We will investigate.

    Example
    <%@ Page Language="C#" %>
     
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest)
            {
                Store store = this.GridPanel1.GetStore();
                store.DataSource = new object[] 
                { 
                    new object[] { "test1", "", "test3" },
                    new object[] { "", "", "" },
                    new object[] { "test7", "", "test9" }
                };
            }
        }
    </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">
                        <Model>
                            <ext:Model runat="server">
                                <Fields>
                                    <ext:ModelField Name="test1" />
                                    <ext:ModelField Name="test2" />
                                    <ext:ModelField Name="test3" />
                                </Fields>
                            </ext:Model>
                        </Model>
                    </ext:Store>
                </Store>
                <ColumnModel runat="server">
                    <Columns>
                        <ext:Column runat="server" Text="Test1" DataIndex="test1" />
                        <ext:Column runat="server" Text="Test2" DataIndex="test2" />
                        <ext:Column runat="server" Text="Test3" DataIndex="test3" />
                    </Columns>
                </ColumnModel>
                <TopBar>
                    <ext:LiveSearchToolbar runat="server" />
                </TopBar>
                <Plugins>
                     <ext:LiveSearchGridPanel runat="server" />
                </Plugins>
            </ext:GridPanel>
        </form>
    </body>
    </html>
  9. #9
    Fixed in SVN, please update and retest
  10. #10
    Quote Originally Posted by Vladimir View Post
    Fixed in SVN, please update and retest
    Hi,

    i've downloaded the latest SVN Trunck and trying to compile the same but i m getting fallowing errors. can anybody help me in this regards.
    Please find attached Screenshot for the same.

    Click image for larger version. 

Name:	Ext.Net_Compile_Error.jpg 
Views:	15 
Size:	98.0 KB 
ID:	6644
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 6
    Last Post: Jun 20, 2013, 1:25 PM
  2. Replies: 1
    Last Post: Apr 22, 2013, 11:47 AM
  3. Replies: 1
    Last Post: Jan 18, 2012, 4:27 PM
  4. [CLOSED] PlugIn cast error
    By Edward in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 30, 2010, 11:07 AM
  5. [CLOSED] [1.0] EditableGrid Plugin Error
    By ashton.lamont in forum 1.x Legacy Premium Help
    Replies: 14
    Last Post: Feb 26, 2010, 1:14 PM

Tags for this Thread

Posting Permissions