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

ToolTip for GridViewImageColumn

4 Answers 151 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Andrej Zecevic
Top achievements
Rank 1
Andrej Zecevic asked on 12 Nov 2009, 01:25 AM
Hi there,

I am in the process of evaluating the Silverlight GridView for use on one of our projects.

A quick question: What is the simplest way to display a tool tip for a GridViewImageColumn??

The whole situation is I have an enum property on my data item and i would like to display a different image in the column depending on the value. I would then like to display an explanation of the icon as a tool tip. I found the GridViewDataColumn.ToolTipTemplate property but am unsure as to how to use it. I did find an example on using a custom ValueConverter to convert the enum into an image url, so i am fairly confident i can acheive this. Either way what would be the best approach?

A code (xaml) example would be greatly appreciated. We have a strict no code behind policy :)

Thank you.

4 Answers, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 17 Nov 2009, 03:52 PM
Hi Andrej Zecevic,

Please excuse me for the late answer we had some overhead with the latest release.
Now straight on the question :

In the  attached example I have tried to resemble a scenario similar to yours .
Please let me know if you find any troubles adapting this to your project.

* Please use our very latest binaries as they contain some critical fixes regarding the tooltip template.
The latest internal build (from yesterday)  should be available for download in your Clent.NET account.

All the best,
Pavel Pavlov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Steven
Top achievements
Rank 1
answered on 12 Sep 2011, 05:04 PM
Hi,

I cannot add a tooltip to my GridViewImageColumn

<telerik:GridViewImageColumn  ToolTipService.ToolTip="MyToolTip"/>

Could you please post some code because I am cannot open .zip file.

Regards,
S
0
Vlad
Telerik team
answered on 13 Sep 2011, 06:46 AM
Hello,

 Here is the code from the ZIP:

<telerik:RadGridView Width="200" Height="200"  x:Name="RadGridView1" AutoGenerateColumns="False" >
    <telerik:RadGridView.Columns>
        <telerik:GridViewImageColumn DataMemberBinding="{Binding Gender, Converter={StaticResource GenderToImageConverter}}" >
            <telerik:GridViewImageColumn.ToolTipTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Gender}" />
                </DataTemplate>
            </telerik:GridViewImageColumn.ToolTipTemplate>
        </telerik:GridViewImageColumn>
    </telerik:RadGridView.Columns>
</telerik:RadGridView>

All the best,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Steven
Top achievements
Rank 1
answered on 13 Sep 2011, 08:40 AM
Thanks Vlad !

Regards,
S
Tags
GridView
Asked by
Andrej Zecevic
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Steven
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or