Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Warning from Datatables
#1
I create my HTML table (datatables.net) include IWLabel raw text

<table id="mytable" class="table table-hover table-striped table-condensed dt-responsive nowrap" width="100%" cellspacing="0">
...
</table>

I have in my HTML template {%mytable%} and this style:
<style>
.sunday {
  background-color: red !important;
}

</style>

After view IWLabel send (color row with red which are sunday):

WebApplication.CallBackResponse.AddJavaScriptToExecute
        ('$(document).ready( function () {'
        + 'var table = $("#mytable").DataTable({'
        + '"createdRow": function(row, data, dataIndex)'
        + '{ if (data[2] == "sun") {$(row).addClass("sunday");} }'
        + '});'
        + '}) ');


After AddJavaScriptToExecute get it:
DataTables warning: Non-table node initialisation (SPAN). For more information about this error, please see http://datatables.net/tn/2
Reply


Messages In This Thread
Warning from Datatables - by matija - 10-15-2019, 08:53 AM
RE: Warning from Datatables - by kudzu - 10-15-2019, 02:56 PM
RE: Warning from Datatables - by matija - 07-16-2020, 06:49 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)