How to have rowspan/colspan and javascript data

How to have rowspan/colspan and javascript data

subzero255subzero255 Posts: 2Questions: 0Answers: 0

Hi,
I have this situation where I want to use DataTable to display livestats.
First, there is one ajax call that get the table column list and some are embedded to other (ie, we should use rowspan and colspan)
So, how can we provide columns list in the form
[{name: column1},
{name: column2},
{name: column3, columns:[{name: column31}, {name: column32}, {name: column33}]
},

So, column31, column32, column33, are under column3.

I tried to build the header in HTML. But if I do so, then I have issues with data which comes as ajax object as well.

Thanks,

Replies

  • subzero255subzero255 Posts: 2Questions: 0Answers: 0

    No one ???

  • allanallan Posts: 61,650Questions: 1Answers: 10,094 Site admin

    Currently no, there is no option to specify a colspan programmatically in DataTables. Indeed there is no option to have a colspan or rowspan in the tbody at all, as it introduces a lot of complexity and would seriously increase the size of the library.

    Allan

This discussion has been closed.