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

Tooltip with RadBinaryImage

3 Answers 77 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Marlon Santos
Top achievements
Rank 1
Marlon Santos asked on 20 Jul 2010, 11:51 PM
Hi,

I am trying to use a RadBinaryImage control inside a RadTooltip control so that I can display a bigger version of a picture but it doesn't work. Below is a snippet of code of what I am trying to do. I got this suggestion from one of the threads in the forum. It seemed simple enough to try, but it doesn't work for me; maybe I am missing something.

The actual image content comes from a linq datasource.

 

<telerik:GridTemplateColumn AllowFiltering="false" HeaderText="Image" ReadOnly="True">

 

 

<ItemTemplate>

 

 

<telerik:RadBinaryImage runat="server" ID="RadBinaryImage1" DataValue='<%# Eval("ImageContent") %>'

 

 

AutoAdjustImageControlSize="false" Width="40" Height="40" ToolTip='<%#Eval("ImageDescription", "{0}") %>'

 

 

AlternateText='<%#Eval("ImageDescription", "{0}") %>' />

 

 

<telerik:RadToolTip runat="server" ID="RadToolTip1" TargetControlID="radBinaryImage1"

 

 

Position="Center">

 

 

<telerik:RadBinaryImage runat="server" ID="radBinaryImage2" DataValue='<%#Eval("ImageContent") %>'

 

 

AutoAdjustImageControlSize="false" Width="200" Height="200" ToolTip='<%#Eval("ImageDescription", "{0}") %>'

 

 

AlternateText='<%#Eval("ImageDescription", "{0}") %>' />

 

 

</telerik:RadToolTip>

 

 

</ItemTemplate>

 

 

<HeaderStyle HorizontalAlign="Center" />

 

 

<ItemStyle HorizontalAlign="Center" />

 

 

</telerik:GridTemplateColumn>

 



I thank you fo any help I can get.

Marlon.

3 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 23 Jul 2010, 12:55 PM
Hi Marlon Santos,

I see form your code that the target image has ID=RadBinaryImage1, while the tooltip has TargetControlID=radBinaryImage1. Note, that the casing matters and thus you should use the very same IDs.

Please, correct the IDs and the casing to match and let us know how it goes.

All the best,
Svetlina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Marlon Santos
Top achievements
Rank 1
answered on 23 Jul 2010, 05:24 PM

Hi Svetlina,

I did realize that after I had submitted it. But it still doesn't work. THe tool tip comes up but no image shows up only the text from the property ToolTip='<%#Eval("ImageDescription", "{0}") %>'.

Here is the code Snippet again:

 

 

<telerik:GridTemplateColumn AllowFiltering="false" HeaderText="Image" ReadOnly="True">

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

<telerik:RadBinaryImage runat="server" ID="RadBinaryImage1" DataValue='<%# Eval("ImageContent") %>'

 

 

 

 

 

AutoAdjustImageControlSize="false" Width="40" Height="40" ToolTip='<%#Eval("ImageDescription", "{0}") %>'

 

 

 

 

 

AlternateText='<%#Eval("ImageDescription", "{0}") %>' />

 

 

 

 

 

<telerik:RadToolTip runat="server" ID="RadToolTip1" TargetControlID="RadBinaryImage1"

 

 

 

 

 

Position="Center" Height="200" Width="200">

 

 

 

 

 

<telerik:RadBinaryImage runat="server" ID="RadBinaryImage2" DataValue='<%#Eval("ImageContent") %>'

 

 

 

 

 

AutoAdjustImageControlSize="false" Width="200" Height="200" ToolTip='<%#Eval("ImageDescription", "{0}") %>'

 

 

 

 

 

AlternateText='<%#Eval("ImageDescription", "{0}") %>' />

 

 

 

 

 

</telerik:RadToolTip>

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

<HeaderStyle HorizontalAlign="Center" />

 

 

 

 

 

<ItemStyle HorizontalAlign="Center" />

 

 

 

 

 

</telerik:GridTemplateColumn>

 

 

 


Thanks,

Marlon.

0
Petio Petkov
Telerik team
answered on 29 Jul 2010, 10:52 AM
Hello Marlon Santos,

At present "title" has priority over innercontent, so if you remove  RadBinaryImage1's ToolTip and AlternateText everything should be fine, e.g.

<telerik:GridTemplateColumn AllowFiltering="false" HeaderText="Image" ReadOnly="True">
                        <ItemTemplate>
                            <telerik:RadBinaryImage runat="server" ID="RadBinaryImage1" DataValue='<%# Eval("Data") %>'
                                AutoAdjustImageControlSize="false" Width="40" Height="40"/>
                            <telerik:RadToolTip runat="server" ID="RadToolTip1" TargetControlID="RadBinaryImage1" Skin="Black"
                                Position="Center" Height="200" Width="200">
                                <telerik:RadBinaryImage runat="server" ID="RadBinaryImage2" DataValue='<%#Eval("Data") %>'
                                    AutoAdjustImageControlSize="false" Width="200" Height="200" ToolTip='<%#Eval("Description", "{0}") %>'
                                    AlternateText='<%#Eval("Description", "{0}") %>' />
                            </telerik:RadToolTip>
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle HorizontalAlign="Center" />
                    </telerik:GridTemplateColumn>
Let us know if you have any other questions.

Kind regards,
Petio Petkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
ToolTip
Asked by
Marlon Santos
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Marlon Santos
Top achievements
Rank 1
Petio Petkov
Telerik team
Share this question
or