custom input values / formats

2 posts, 0 answers
  1. Rafe
    Rafe avatar
    9 posts
    Member since:
    Feb 2014

    Posted 25 Oct 2014 Link to this post

    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!
  2. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 29 Oct 2014 Link to this post

    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.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top