I got a radcombobox and I use autocomplete features it works for single item well but when I set Autocompleteseperator property it didnt work. radcombobox and the server code which I used for autocomplete features given below all help will be appreciated.
| <telerik:RadComboBox ID="cmbUnvan" Runat="server" AllowCustomText="True" |
| AutoPostBack="True" EnableLoadOnDemand="True" |
| onitemsrequested="cmbUnvan_ItemsRequested" Height="73px" Width="230px" |
| AutoCompleteSeparator=";" MarkFirstMatch="True"> |
| <CollapseAnimation Duration="200" Type="OutQuint" /> |
| </telerik:RadComboBox> |
| protected void cmbUnvan_ItemsRequested(object o, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e) |
| { |
| RadComboBox combo = (RadComboBox)o; |
| combo.Items.Clear(); |
| SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["Personelcon"].ConnectionString); |
| string text = e.Text; |
| string sql = "SELECT * from Unvan WHERE Uname LIKE '" + text.Replace("'", "''") + "%'"; |
| SqlCommand selectCommand = new SqlCommand(sql, connection); |
| SqlDataAdapter adapter = new SqlDataAdapter(selectCommand); |
| DataTable dt = new DataTable(); |
| adapter.Fill(dt); |
| foreach (DataRow row in dt.Rows) |
| { |
| RadComboBoxItem item = new RadComboBoxItem(row["Uname"].ToString()); |
| item.Value = row["Uid"].ToString(); |
| //item.Text = Convert.ToString(row["Uname"]); |
| combo.Items.Add(item); |
| } |
| } |