hi, i have a combobox with filtering, i want to make sure that the text entered in combobox is item in list so i'm using SelectedValue method. Lets say i have database with ID : CUST01, when i type "CUST01" in combobox and hit check button it displays correctly "Item in list", but when i type "cust01" in combobox it displays "not item in list". I didn't turn on the case-sensitive property, neither did i have allowed custom text property. I'm using 2011 Q1 version, i don't know if this problem exist in the latest version, code belows
ASPX
VB
ASPX
<telerik:RadComboBox ID="cboCust" Runat="server" Width="178px" DropDownWidth="500px" HighlightTemplatedItems="True" EmptyMessage="Select Customer" EnableLoadOnDemand="True" Filter="Contains" Height="250px" MarkFirstMatch="True" AutoPostBack="True"> <HeaderTemplate> <table style="width:415px; text-align:left"> <td style="width:50px;">ID</td> <td style="width:200px;">Name</td> <td style="width:200px;">Address</td> </table> </HeaderTemplate> <ItemTemplate> <table style="width:415px; text-align:left"> <td style="width:50px;"> <%# DataBinder.Eval(Container.DataItem, "ID")%> </td> <td style="width:200px;"> <%# DataBinder.Eval(Container.DataItem, "Name")%> </td> <td style="width:200px;"> <%# DataBinder.Eval(Container.DataItem, "Address")%> </td> </table> </ItemTemplate></telerik:RadComboBox>VB
Protected Sub cboCust_ItemsRequested(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs) Handles cboCust.ItemsRequested cSQL = "SELECT * FROM Customer" With cboCust .DataSource = FillDataset(cSQL) .DataTextField = "ID" .DataValueField = "ID" .DataBind() End WithEnd SubProtected Sub btnCheck_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCheck.Click If cboCust.SelectedValue = "" Then lblMsg.Text = "Not item in list" Else lblMsg.Text = "Item in list" End IfEnd Sub