row rendering in datatable

row rendering in datatable

rshunrshun Posts: 44Questions: 9Answers: 0

I have a table.
ID end with -1, always has no data
ID end with -2 or -3, displays data of Exercise 1, Exercise 2, Exercise 3, Exercise 4 and Overall.

Can I use row rendering to do that?

Thank you.



  • colincolin Posts: 14,713Questions: 1Answers: 2,511

    colspan isn't supported within the table, as it messes up the ordering or a record. You could use columns.render to put the "No Data" in all cells, just not a single cell that spans the table, I'm afraid,


  • rshunrshun Posts: 44Questions: 9Answers: 0

    Thank you for answering my question.

    I use "createdCell" to add $(td).attr('colspan', '4'); to Exercise 1 cell. Then, use (in "createdCell") $(td).remove(); to remove cell for Exercise 2 to Overall.


  • kthorngrenkthorngren Posts: 18,255Questions: 25Answers: 4,340

    Thats an interesting solution but not supported by Datatables. If always has no data means these cells have an empty string then the solution might behave as expected. However if there is data within the cells then that data will affect sorting and searching even though its not displayed.


Sign In or Register to comment.