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

Getting Hardcoded Description from a DB value

1 Answer 50 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Skethel
Top achievements
Rank 1
Skethel asked on 15 Aug 2017, 03:53 PM

Hello everyone.

Currently I'm developing an application for my parents busines and I came to a problem which I can not solve.I am trying to show in the RadCombobox a description (External, Internal) depending on the value I get from SQL (1 or 2). I've try different solutions but I don't know if I am doing something wrong because I am not able to show it.

 

1 Answer, 1 is accepted

Sort by
0
Dilyan Traykov
Telerik team
answered on 18 Aug 2017, 01:30 PM
Hello Skethel,

Could you please clarify where exactly you want to display the description and if its value should be based on the control's selected item or if it should be displayed for each item in the popup?

For example, if you want the description to appear in a tooltip or above the control based on the selected item, you should modify the default control template as per your requirement.

If you want a description for each individual item in the control's popup, you can set its ItemTemplate property to a DataTemplate of your choice. Here's an example:

<telerik:RadComboBox.ItemTemplate>
    <DataTemplate>
        <TextBlock Text="{Binding Name}" ToolTip="{Binding Description}" />
    </DataTemplate>
</telerik:RadComboBox.ItemTemplate>

I hope you find these suggestions helpful. If that is not the case, however, please provide more details on your exact requirements and I will gladly assist you further.

Regards,
Dilyan Traykov
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
ComboBox
Asked by
Skethel
Top achievements
Rank 1
Answers by
Dilyan Traykov
Telerik team
Share this question
or