Error when using image with datatable
Error when using image with datatable
Dear I have the below code
<asp:GridView ID="gvCustomers" runat="server" OnRowDataBound="gvCustomers_RowDataBound" AutoGenerateColumns="False" class="table table-striped"
Width="100%" >
<Columns>
<asp:BoundField DataField="DORMARSOUM" HeaderText="Marsoum" />
<asp:BoundField DataField="DORCAZA" HeaderText="Caza" />
<asp:BoundField DataField="DORROAD" HeaderText="Road" />
<asp:BoundField DataField="DORMARSOUM" HeaderText="Marsoum" />
<asp:BoundField DataField="DORCAZA" HeaderText="Caza" />
<asp:BoundField DataField="DORROAD" HeaderText="Road" />
<asp:TemplateField>
<ItemTemplate>
<asp:Image ID="Image1" runat="server" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
in the code behind, am applying condition to set the image
but am getting the following error
localhost says:
Datatables warning:Non -Table node initialisation(IMG).For more information about this error, please see http://datatables.net/tn/2
can somebody help
Answers
I'm not sure what your code is generating but did you follow the troubleshooting link in the message?
https://datatables.net/manual/tech-notes/2
You should inspect your resulting HTML. Looks like you might have something like this to init Datatables:
$('#Image1').DataTable()
Kevin
You are being directed to a page which shows the explanation:
You don't have a HTML table in your code.