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

Not easy to show images in RadGrid

4 Answers 74 Views
Grid
This is a migrated thread and some comments may be shown as answers.
HsuKang
Top achievements
Rank 1
HsuKang asked on 18 Mar 2009, 03:19 AM
I found that I could simply add a ImageField to show images in GridView, but can I do that as simply in RadGrid?  If not, could Telerik change this situation in the future version of RadGid?  Thanks a lot.

4 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 18 Mar 2009, 04:19 AM
Hi,

I think Template column will give you the power to customize the image displaying in radgrid.

ASPX:
<telerik:GridTemplateColumn HeaderText="Photo" UniqueName="TemplateColumn" > 
                                    <ItemTemplate> 
                                        <asp:Image ID="ProductImage" runat="server" Width="100%" ImageUrl='<%# (Eval("Name") is System.DBNull)? "Img/ImageNotAvailable.gif" : "Img/" + Eval("Name") %>' 
                                            AlternateText="No preview available" /> 
                                    </ItemTemplate> 
                                </telerik:GridTemplateColumn>  


Thanks
Shinu.
 


0
HsuKang
Top achievements
Rank 1
answered on 18 Mar 2009, 06:30 AM
Hi Shinu,

     Thank you for your response.  Maybe your suggestion will wok perfectly, yet you are supposed to admit that it is really harder to show images in RadGrid than GridView.  What a shame!

HsuKang
0
Accepted
Dimo
Telerik team
answered on 19 Mar 2009, 09:46 AM
Hi HsuKang,

We will add a an image column to RadGrid in one of our next releases.

Kind regards,
Dimo
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
HsuKang
Top achievements
Rank 1
answered on 19 Mar 2009, 01:40 PM
Hi Dimo,
     
     It is a good news.  Thank you very much for accepting my suggestion.

HsuKang
Tags
Grid
Asked by
HsuKang
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
HsuKang
Top achievements
Rank 1
Dimo
Telerik team
Share this question
or