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!
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!