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

Radbinaryimage as buttton in grid view

1 Answer 101 Views
BinaryImage
This is a migrated thread and some comments may be shown as answers.
shyam k
Top achievements
Rank 1
shyam k asked on 27 Jan 2010, 06:06 PM
HI,
    I have a radbinaryimage in grid view . When clicked on the image i need to redirect them to another page where it shows the image based on the query string passed.  Can any one suggest me how to do that....  I tried to put the radbinaryimage inside the asp link button. it worked for list view not in grid view.


Its URGENT

1 Answer, 1 is accepted

Sort by
0
Accepted
Radoslav
Telerik team
answered on 02 Feb 2010, 12:18 PM
Hi Shyam,

You could try to add a TemplateField in your GridView. There you could add RadBinaryImage enclosed with an asp:LinkButton with PostBackUrl property pointing to another page and passing the query sting parameter:

<asp:TemplateField>
   <ItemTemplate>
      <asp:LinkButton runat="server" ID="linkButton" CommandName="selectImage" PostBackUrl='<%# "~/WebForm1.aspx?id=" + Eval("ID") %>'>
            <telerik:RadBinaryImage ResizeMode="None" Style="width: 60px; height: 60px;" ID="radBinaryImage" runat="server" DataValue='<%# Eval("Picture") %>' />
      </asp:LinkButton>
   </ItemTemplate>
</asp:TemplateField>

Additionally I am sending you a simple example which illustrates how to achieve the desired scenario.

I hope this helps.

Regards,
Radoslav
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.
Tags
BinaryImage
Asked by
shyam k
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
Share this question
or