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

custom input values / formats

1 Answer 13 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Rafe
Top achievements
Rank 1
Rafe asked on 25 Oct 2014, 07:22 PM
I'm looking for the simplest way to show multiple values from the selected item inside of the input area for a combobox. So for instance if I'm binding my combobox to a list of Person objects, that each have FirstName and LastName string properties, then I'd like to display the full name (the composite of both properties) of the selected person in the input area.

One way I see to do this is to create a property called FullName on the Person class that returns the composite string of the FirstName and LastName properties. And then set DataTextField on the combo box to use FullName to populate the input field.

Are there any other ways to accomplish this? Is it possible to create a template for the input area content or some other way to set the input value other than using DataTextField?

Thanks in advance!

1 Answer, 1 is accepted

Sort by
0
Peter Filipov
Telerik team
answered on 29 Oct 2014, 11:48 AM
Hello Rafe,

It is not possible to template the input area of the RadComboBox. Our advice is to use the approach that you described.

Regards,
Peter Filipov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
ComboBox
Asked by
Rafe
Top achievements
Rank 1
Answers by
Peter Filipov
Telerik team
Share this question
or