Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
215
Adding <img /> to WebDataGridCel not workingl
posted

Hey there. (i posted this earlier in another thread, but nobody answers because the thread is already marked as solved)

I've managed to load images in my WebDataGrid (Infragstics4.Web.v15.2) with your method and bit from a IG example site.

The designer tells me, i added the the right way to the TemplateDataField.

Designer View

But when i debug the project (in IE or in Chrome) i get nothing... 

Result in Chrome

Here is my Code:

<ig:WebDataGrid ID="WebDataGrid1" runat="server" Height="100%" Width="100%">
<Columns>
<ig:TemplateDataField Key="Image" VisibleIndex="0">
<Header Text="Bild"></Header>
<ItemTemplate>

<%-- static image for testing --%>
<img style="height: 70px;width: 50px" src="C:\Users\f.schaetzler\Pictures\Folders-OS-Pictures-Library-Metro-icon.png"/>

<%-- getMAImage returns the imagepath--%>
<img style="height:70px;width: 50px" src="<%# getMAImage(DataBinder.Eval(Container, "DataItem.adusername"))%>"/>
</ItemTemplate>
</ig:TemplateDataField>
</Columns>
<ClientEvents Initialize="intializeGrid" />
<Behaviors>
<ig:Activation Enabled="true" />
<ig:Sorting Enabled="true" SortingMode="Single"> 
</ig:Sorting>
<ig:Selection Enabled="true" RowSelectType="Single" CellClickAction="Row" ColumnSelectType="Single" />
</Behaviors>
</ig:WebDataGrid>
<ig:WebScriptManager ID="WebScriptManager1" runat="server"></ig:WebScriptManager>

The rest of the colums are auto generated from the databinding loaded from the code behind. 

Thank you for any help! And have a nice weekend. 

Parents Reply Children
No Data