Remove data of cell

Remove data of cell

blue16blue16 Posts: 5Questions: 1Answers: 0
edited September 2014 in Free community support

Hi, I have the next code, I want remove data cell and put other value

I tried to use $('td', row).eq(0).add(); but not working and with 'append' add the new value to old value

Is there a way for remove old data?


var table; var i $(document).ready(function() { table = $('#example').dataTable({ "ordering": false, "createdRow": function(row, data, index) { switch(i){ case 2: /*Here I want to remove the data and put the new value*/ $('td', row).eq(0).append(drawBanks(data[0])); break; case 4: /*Here I want to remove the data and put the new value*/ $('td', row).eq(0).append(drawCoins(data[0])); i=0; break; default: break; } i++; } }); loadDataTable(); }); function loadDataTable() { table.api().ajax.url(?).load(); } function drawBanks(ID){ return some_string; } function drawCoins(ID){ return some_string; }

thanks

This discussion has been closed.