Advertisements
Home > Misc > Data Tables – Error – Non table node initialization

Data Tables – Error – Non table node initialization

In one of my Dynamics portal’s requirements, I had to use Data Tables table control to bind the search results.

After referring helper files and configured the ‘Data Tables’ table control in my HTML, I encountered below error during the run:

Data Table - Error

Reason & Fix:

  • ‘Data Table’ table control requires a <table> place holder in the HTML page, which will get rendered with result set (i.e., json collection) in run time.

In your <script>:

var table = $(‘#customGrid‘).DataTable({
data: rows,
destroy: true,
columns: columns});

  • If you refer any control (i.e., Div/Span etc…) other than <table> you will get the error.

In your HTML <body>:

<table id=”customGrid” class=”display”></table>

  • I wrongly used <Div> control in my case and replaced with <Table> to fix the issue.

🙂

Advertisements
Categories: Misc Tags: ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: