This is a migrated thread and some comments may be shown as answers.
Editable ComboBox
3 Answers 44 Views
This is a migrated thread and some comments may be shown as answers.
Vitalii
Top achievements
Rank 1
Vitalii asked on 11 Jan 2013, 09:39 AM
Hello, Telerik
I have an RadComboBox:
<telerik:RadComboBox runat="server" IsEditable="True" Width="167px" style="margin-left: 23px;" ID="cbMails" EmptyMessage="Choose a mail text"  OnSelectedIndexChanged="cbMails_SelectedIndexChanged" CssClass="ComboTop" AutoPostBack="True" meta:resourcekey="cbMailsResource1"></telerik:RadComboBox>

And I have a button
 <asp:Button runat="server" ID="AddButton" Text="Add" CssClass="GreenContentButton"<br>                                    Width="60px" OnClick="AddButton_OnClick" meta:resourcekey="AddButtonResource1" />

On button press I add new item in RadComboBox on server side.
I want to be able to edit ComboBot item in it.
I used IsEditable mode set to True but it does not work.
In matter of fact it's not shown in intellitrace in regular Asp.Net.
As far as I understood, it's available with silverlight and wpf versions of control. And by the logic in must be available in here, am I right?

Please say I am)

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 1
answered on 11 Jan 2013, 12:15 PM
Hi,

I suppose you want to allow the user to type in the input area of RadComboBox. You can set AllowCustomText property as true to achieve your scenario. Also check the following demo.
ComboBox / Autocomplete

Thanks,
Princy
0
Vitalii
Top achievements
Rank 1
answered on 11 Jan 2013, 12:28 PM
I did not write exactly what i want, sorry)

I want user to be able to edit ComboBox item and save it on some button click.
0
Nencho
Telerik team
answered on 16 Jan 2013, 08:07 AM
Hello Vitalii,

I can suggest you to use the FindItemByText() or FindItemByValue(), in order to access a specific item. Once you have an instance of the RadComboBoxItem, you could edit it and the changes would reflect immediately after the button Click event is fired. Please consider the following implementation at the OnClick event handler of the AddButton:

protected void AddButton_Click(object sender, EventArgs e)
  {
      RadComboBoxItem item = cbMails.FindItemByText("item2");
      if (item != null)
          item.Text = "Item2Item2";
  }


Greetings,
Nencho
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Asked by
Vitalii
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 1
Vitalii
Top achievements
Rank 1
Nencho
Telerik team
Share this question
or