Saturday, 7 September 2013

Always show first item while filtering radcombobox

Always show first item while filtering radcombobox

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

No comments:

Post a Comment