Hi
My item images don't show in this scenario.
i.e. Images are set within the Grids ItemDataBound event.
I did this because the grid is ajaxified and the RadCodeBlock issue raises it's requirement.
<Telerik:GridTemplateColumn HeaderText="Image" UniqueName="ViewImage">
<ItemTemplate>
<asp:Image ID="PartImage" runat="server" Width="35px" Height="35px" />
</ItemTemplate>
<ItemStyle Width ="6%" HorizontalAlign="Center" />
<HeaderStyle CssClass="GridColHeader" Width="6%" HorizontalAlign="Center" wrap="True"/>
</Telerik:GridTemplateColumn>
Code:
if (e.Item is GridDataItem)
{
string Imgurl = Parts.GetMaxImageUrl(dataSourceRow.Image_Id);//Image_Id
GridDataItem item = (GridDataItem)e.Item;
Image img = (Image)item.FindControl("PartImage");
if (Imgurl != "")
{
string appPath = HttpContext.Current.Request.ApplicationPath;
string physicalPath = HttpContext.Current.Request.MapPath(appPath);
string ImageUrl = appPath + "/PartImages/" + Imgurl;
img.ImageUrl = "~/PartImages/" + Imgurl;
}
else
{
img.ImageUrl = "~/Images/placeholder-200.jpg";
}