This is a migrated thread and some comments may be shown as answers.

Premature Highlighting

10 Answers 81 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Darryl
Top achievements
Rank 1
Darryl asked on 30 Nov 2010, 12:25 PM
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).

10 Answers, 1 is accepted

Sort by
0
Kalina
Telerik team
answered on 03 Dec 2010, 01:36 PM
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.
0
Darryl
Top achievements
Rank 1
answered on 03 Dec 2010, 05:43 PM
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.
0
Darryl
Top achievements
Rank 1
answered on 03 Dec 2010, 05:48 PM
Sorry previous screenshot didnt show behavious correctly in middle stage.
0
Darryl
Top achievements
Rank 1
answered on 09 Dec 2010, 12:52 PM
any update on this?
0
Kalina
Telerik team
answered on 09 Dec 2010, 01:15 PM
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.
0
Darryl
Top achievements
Rank 1
answered on 09 Dec 2010, 01:25 PM
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).
0
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
answered on 10 Dec 2010, 01:40 AM
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...
0
Kalina
Telerik team
answered on 16 Dec 2010, 02:05 PM
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.
0
Darryl
Top achievements
Rank 1
answered on 16 Dec 2010, 02:45 PM
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;
    }
}

0
Simon
Telerik team
answered on 22 Dec 2010, 12:57 PM
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.
Tags
ComboBox
Asked by
Darryl
Top achievements
Rank 1
Answers by
Kalina
Telerik team
Darryl
Top achievements
Rank 1
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
Simon
Telerik team
Share this question
or