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

Item's Tooltip

1 Answer 91 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
syed
Top achievements
Rank 1
syed asked on 17 Jan 2011, 12:37 PM
All,
I want to display tooltip on each item of the combobox. i'm doing the following way to display it
<telerik:RadComboBox Grid.Row="10" Grid.Column="1" x:Name="Mycombobox"   VerticalAlignment="Bottom" HorizontalAlignment="Left"
                                Width="180" FontSize="10" Height="18" ItemsSource="{Binding ContinentRefDataList, Mode=TwoWay}" DisplayMemberPath="ContinentCode"
                                SelectedValuePath="ContinentID" Text="{Binding ContinentCode, Mode=TwoWay}"
                                SelectedValue="{Binding ContinentID, ValidatesOnExceptions=True, NotifyOnValidationError=True, Mode=TwoWay}"
                                                 ToolTipService.ToolTip="{Binding ContinentName}"
                                                 >
                            </telerik:RadComboBox>

But this is not showing the tooltip of each items continent name. though it shows the continentcode correctly. Please guide me in this easy task. I want to display continent name of each dropdown item (not only of selected one).

Thanks.

1 Answer, 1 is accepted

Sort by
0
Dani
Telerik team
answered on 18 Jan 2011, 09:20 AM
Hi Syed,

You should add a TooltipService.ToolTip in the ItemTemplate of RadComboBox rather than the ComboBox itself. For example,
<telerik:RadComboBox Width="200" VerticalAlignment="Center">
            <telerik:RadComboBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding Content}" Foreground="Red">  
                            <ToolTipService.ToolTip>  
                                <ToolTip Content="TEXT" />
                            </ToolTipService.ToolTip>
                        </TextBlock>
                    </StackPanel>
                </DataTemplate>
            </telerik:RadComboBox.ItemTemplate>
  
...
</telerik:RadComboBox>

I hope this helps.

Best wishes,
Dani
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
ComboBox
Asked by
syed
Top achievements
Rank 1
Answers by
Dani
Telerik team
Share this question
or