Tooltip with RadBinaryImage

4 posts, 0 answers
  1. Marlon Santos
    Marlon Santos avatar
    12 posts
    Member since:
    Oct 2009

    Posted 20 Jul 2010 Link to this post

    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.
  2. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 23 Jul 2010 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Marlon Santos
    Marlon Santos avatar
    12 posts
    Member since:
    Oct 2009

    Posted 23 Jul 2010 Link to this post

    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.

  5. Petio Petkov
    Admin
    Petio Petkov avatar
    825 posts

    Posted 29 Jul 2010 Link to this post

    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
Back to Top