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

MarkFirstMatch property with same text values

1 Answer 48 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
James Van Buren
Top achievements
Rank 2
James Van Buren asked on 08 Sep 2009, 10:19 PM
WE found a wierd behaviour, with RadComboBox , tried many different thing, and are lost, need some guidence.
<telerik:RadComboBox ID="ddlDriverLastName" Runat="server" Skin="Office2007" DropDownWidth="470" Width="133"   
                                                 MarkFirstMatch="true" AllowCustomText="true" SelectOnTab="true" AutoPostBack="false"   
                                                 ShowWhileLoading="true" ToolTip="Select Driver" Sort="None" 
                                                 HighlightTemplatedItems="true" EnableItemCaching="false" Filter="Contains" 
                                                 OnClientSelectedIndexChanged="ChangeInputColor">  
 

we have multicolumn dropdown with Last Names, when i bind the dropdown i set DriverID as value, and Last Name as text.

In case when we bind list that contains identical last names, we get this wierd behaviour, when first item in the list with the same last name is selected and page is reposted, the SelectedValue that is being passed by the control is that of the previously selected item with the same Last Name.
In other words, we can never get the first Last name item in the list, to be ever recognized as the one being selected.
Does anyone esle have this issue?

1 Answer, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 11 Sep 2009, 01:07 PM
Hi James Van Buren,

Please make sure that the values (DriverID) of all items are unique. RadComboBox makes the selection (SelectedValue) based on the Value of the selected item.

What is the role of the MarkFirstMatch in the issue? Is it correctly working when you disable that property?


Regards,
Veselin Vasilev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
ComboBox
Asked by
James Van Buren
Top achievements
Rank 2
Answers by
Veselin Vasilev
Telerik team
Share this question
or