Ramco Ramco

Ramco Ramco

  • 443
  • 3.4k
  • 526.9k

Datatable error

Jun 6 2023 11:06 AM

Hi

  I am getting error - Non-table node initialisation (DIV).

<div class="table table-bordered table-hover datatable-highlight">
    <asp:GridView ID="grdPlanning" class="table table-bordered" runat="server"  OnRowDataBound="gr_RowDataBound" AutoGenerateColumns="true">
    </asp:GridView>
</div>
protected void gr_RowDataBound(object sender, GridViewRowEventArgs e)
{
    try
    {
        if (e.Row.RowType == DataControlRowType.Header)
        {            
            e.Row.TableSection = TableRowSection.TableHeader;
        }
    }
    catch
    {}
}

Thanks


Answers (4)