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.

R

Answers

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    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,

    Colin

  • 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.

    R

  • kthorngrenkthorngren Posts: 20,144Questions: 26Answers: 4,736

    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.

    Kevin

Sign In or Register to comment.