Premature Highlighting

11 posts, 0 answers
  1. Darryl
    Darryl avatar
    6 posts
    Member since:
    Nov 2010

    Posted 30 Nov 2010 Link to this post

    I have come accross a bit of a weird problem.

    Quite simple implementation:

     

    <telerik:RadComboBox ID="radProductList" Sort="Ascending" width="125" Runat="server" AutoPostBack="true" Font-    Names="Verdana" Font-Size="7pt">

     

     

     

    </telerik:RadComboBox>

     

     


     

    Protected Sub radProductList_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles radProductList.Load

     

        radProductList.AllowCustomText =

     

    True

     

     

        radProductList.MarkFirstMatch =

    True

     

     

        radProductList.MaxHeight = 200

        radProductList.DataSource = StockList

     

     

        radProductList.DataBind()

     

    End Sub

     

     


    The problem is with the highlighting.  If the list contains the following:
    VAL/WIRE/2
    VAL/WIRE/250
    VAL/WIRE/3

    and we type "VAL/WIRE/2" into the combo box, the whole word is highlighted - as a result, people trying to type "VAL/WIRE/250" and up clearing the box with a "5".

    I've tried various combinations of parameters, markfirstmatch being the one that I suspected was causing the problem, but no luck.

    The problem only seems to be happening when the text ends with a number (don't take that as the only sittuation as it seems intermittent).
  2. Kalina
    Admin
    Kalina avatar
    918 posts

    Posted 03 Dec 2010 Link to this post

    Hi Darryl,

    I am not sure that I understand what you mean by: " and we type "VAL/WIRE/2" into the combo box, the whole word is highlighted - as a result, people trying to type "VAL/WIRE/250" and up clearing the box with a "5"."

    Could you please explain the issue with more details please and provide me a screenshots that illustrate this "highlight" issue?

    All the best,
    Kalina
    the Telerik team
    Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  3. Darryl
    Darryl avatar
    6 posts
    Member since:
    Nov 2010

    Posted 03 Dec 2010 Link to this post

    Drop down list contains several items.

    VAL/WIRE/2
    VAL/WIRE/250
    VAL/WIRE/3

    If I type "VAL/WIRE/2", the 1st item is highlighted, which would be fine, however if I try to type in "VAL/WIRE/250", I can't, as the VAL/WIRE/2 item becomes highlighted, and is then replaced with "5"

    Screenshots attached to show behaviour if I attempt to type in VAL/WIRE/250.

    This behavious only happens if I use "startswith" - "contains" works fine however is very slow.
  4. Darryl
    Darryl avatar
    6 posts
    Member since:
    Nov 2010

    Posted 03 Dec 2010 Link to this post

    Sorry previous screenshot didnt show behavious correctly in middle stage.
  5. Darryl
    Darryl avatar
    6 posts
    Member since:
    Nov 2010

    Posted 09 Dec 2010 Link to this post

    any update on this?
  6. Kalina
    Admin
    Kalina avatar
    918 posts

    Posted 09 Dec 2010 Link to this post

    Hi Darryl,

    Could you please try reproducing the issue with this online demo?
    What is the difference between the demo and your implementation?

    Kind regards,
    Kalina
    the Telerik team
    Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  7. Darryl
    Darryl avatar
    6 posts
    Member since:
    Nov 2010

    Posted 09 Dec 2010 Link to this post

    The difference is the number of results and the data.

    I'd guess if there was an "Aria Cruze" you may be able to reproduce my problem (as "Aria Cruz" may match instead).
  8. Steve
    Steve avatar
    1885 posts
    Member since:
    Dec 2008

    Posted 09 Dec 2010 Link to this post

    I totally get exactly what you're saying...which browser is this in?  I cant get it to happen in FF or IE8 so far...
  9. Kalina
    Admin
    Kalina avatar
    918 posts

    Posted 16 Dec 2010 Link to this post

    Hi,

    I created a test page similar to the online demo that I mentioned, added an item with the text "Aria Cruize" as you suggested, and tried to reproduce the issue. However on my side the RadComboBox behaves properly - when user types a text at the control input – RadComboBox highlights the first found item that matches the text entered.
    Please take a look at this demonstration video. 

    In order to help you I really need to reproduce the issue locally. Could you please download the test page, change the code in order to reproduce the issue and paste the changed code here? Thank you in advance.

    Best wishes,
    Kalina
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  10. Darryl
    Darryl avatar
    6 posts
    Member since:
    Nov 2010

    Posted 16 Dec 2010 Link to this post

    Not allowed to post CS/Zip so modified code below

    Not the exact issue I'm getting on the live site but behaviour is similar.

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="ComboItemsWithSimilarText.aspx.cs"
        Inherits="ComboItemsWithSimilarText" %>

    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            </telerik:RadScriptManager>
            <telerik:RadComboBox ID="RadComboBox1" Sort="Ascending" width="125" Runat="server" AutoPostBack="true" Font-Names="Verdana" Font-Size="7pt">
            </telerik:RadComboBox>
        </div>
        </form>
    </body>
    </html>




    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Data;

    public partial class ComboItemsWithSimilarText : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
         this.RadComboBox1.AllowCustomText = true;
            this.RadComboBox1.MarkFirstMatch = true;
            this.RadComboBox1.MaxHeight = 200;

            this.RadComboBox1.DataSource = CreateDataSource();
            this.RadComboBox1.DataBind();
        }

        protected IList<String> CreateDataSource()
        {
            IList<String> Options = new List<String>();
            Options.Add("Alejandra Camino");
            Options.Add("Alexander Feuer");
            Options.Add("Ana Trujillo");
            Options.Add("Anabela Domingues");
            Options.Add("Andre Fonseca");
            Options.Add("Ann Devon");
            Options.Add("Aria Cruz");
            Options.Add("Aria Cruze");
            Options.Add("Aria Cruzer");
            Options.Add("Carine Schmidtt");
            Options.Add("Carlos Gonsalez");
            return Options;
        }
    }

  11. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 22 Dec 2010 Link to this post

    Hello Darryl,

    Thank you for the code.

    I cannot reproduce the bug you are describing with the example with 'Aria Cruz'. Can you please let me know which version of Telerik.Web.UI you are using?

    Best wishes,
    Simon
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Back to Top