Reputation: 63
I have telerik radcombobox and it has some items bind to it from database.Always the first item will be "New Account" and rest will add next to it. My code is aspx
<telerik:RadComboBox ID="cmdAccounts" runat="server"
AllowCustomText="true" MarkFirstMatch="true" Filter="Contains">
</telerik:RadComboBox>
aspx.cs pageload code is
RadComboBoxItem NewItem = new RadComboBoxItem("New Account","0");
cmdAccounts.DataSource = ds.Tables[0];
cmdAccounts.DataTextField = "Account_Name";
cmdAccounts.DataValueField = "Account_Number";
cmdAccounts.DataBind();
cmdAccounts.Items.Insert(0, NewItem);
my issue here is when i enter text in radcombobox to filter ,filter is working fine but i want "New Account" to be visible always first as default and filtered items next to it. I mean filter should show filtered items along with "New Account" displayed at first and should be client side.
Thank You
Upvotes: 3
Views: 1289
Reputation: 4081
I believe you have to handle the RadComboBox1_ItemsRequested() event. Over there you have to fech the filtered data from the db insert your default iem to the the first and assign it to the combo box data source.
Upvotes: 1