This is a migrated thread and some comments may be shown as answers.

Add new ListItem feature in list box

1 Answer 196 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Dharmavaram
Top achievements
Rank 1
Dharmavaram asked on 03 Jul 2017, 10:54 AM

Hi 

 

I want to have a deafult combobox at the end of listbox to add new listitem based on selection of item in combobox.

It is similar to new row feature in radgridview.

Is there any option like that or I can customize listbox template to have such feature?

 

Regards,

Nagasree.

 

1 Answer, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 06 Jul 2017, 08:37 AM
Hello Dharmavaram,

Thank you for contacting us.

This functionality is not supported out of the box from the list box. An approach which you could try is to extract and edit the default template of the control. You can take a look at the Editing Control Templates help article in our documentation. In the extracted template you can modify the Grid in the ControlTemplate and add RadComboBox at the end. Then you can subscribe to the SelectionChanged event of the RadComboBox and depend on the selected item add new list box item.

For your convenience, we have created sample project which demonstrates this approach.

Regards,
Dinko
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which you to write beautiful native mobile apps using a single shared C# codebase.
Tags
ListBox
Asked by
Dharmavaram
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question
or