bind array to datatable where first row is columns description
bind array to datatable where first row is columns description

Hi,
am Marco from Italy
I try to use your grid. I want to bind a bidimensional array where the first row is columns name. How to do?
thank
This discussion has been closed.
Answers
I try with this:
$("#grdScarti").dataTable({
data: arRow,
columns: function () {
for (x = 0; x < arcol.length; x++) {
title: arcol[x]
}
}
});
but doesn't run
Datatables will not automatically listen to values in a source array.
You would have to call the
row().invalidate()
to have Datatables read from the data source again.Thanks
Tom
Hi Tom,
thanks for your response but my English is not good: I want only display content of my array with your grid no change or insert are request only display.
I try with this:
$("#grdScarti").dataTable({
data: arRow,
columns: function () {
for (x = 0; x < arcol.length; x++) {
title: arcol[x]
}
}
});
I don't know how many columns are in my array, its fill dynamically.
Thanks
Marco