Hi,every one,i meet a error when i click the button to switch render the dataTable,

Hi,every one,i meet a error when i click the button to switch render the dataTable,

ZetakelorZetakelor Posts: 1Questions: 1Answers: 0

Link to test case:
Debugger code (debug.datatables.net):
html:
<button id='bt1'>
<button id='bt2'>
<button id='bt3'>

<

table id='aTable'>
<thead>
<tr>
<th>xxx>
<th>xxx>
{{if type==='1'}}
<th>column1</th>
In this Html,used template to render data

js:
var app{
dataTable://the table normal render
}

$(document).on('click',function(){
if(null !=dataTable){
app.dataTable.destroy();
}
if($(this).id=='bt3'){
app.renderTable1
}else{
app.renderTable2
}
})

Error messages shown:
Uncaught TypeError:cannot read property 'clientWidth' of null
Description of problem:

the button3 linked the column1 `s show and hide,when i click bt3,its show the error message

Answers

  • colincolin Posts: 15,144Questions: 1Answers: 2,586

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

Sign In or Register to comment.