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
675
can't find an image in a TemplateDataField
posted

Hello,

I've a webdatagrid with a TemplateDataField:

<Columns>
 <ig:BoundDataField DataFieldName="Id" Hidden="true" Key="Id">
  <Header Text="Id" />
 </ig:BoundDataField>
 <ig:TemplateDataField Key="Zuweisen" Width="70px">
  <ItemTemplate>
   <asp:Button ID="btnZuweisen" runat="server" Text="=>" >
   <img id="imgNeueAnfrage" alt="" src="./Bilder/ico_16_112.gif" />
  </ItemTemplate>
  <Header Text="Bild"/>
 </ig:TemplateDataField>
</Columns>

In the InitializeRow-Event, I try to find the Controls:

Dim Button As Button = CType(e.Row.Items(1).FindControl("btnZuweisen"), Button)
Dim Bild As HtmlImage = CType(e.Row.Items(1).FindControl("imgNeueAnfrage"), HtmlImage )

I find the button, but not the image. Why?

Bodo

Parents Reply Children
No Data