Regardless of RowGroup Datatables requires a header. You can define it directly in HTML, use Javascript code to insert into the document before initializing Datatables or use columns.title define the th required for each column. See the HTML requirements for more details.
thank you Kevin,I will use columns.title. But
is there a way to make that header invisible. I dont want header for that table. the first column has a text and second column has a number, third column has a characteristic. i want to group by characteristic. i dont want to say header for column as text and number. though i can use characteristic as column title for the third column.
thanks Kevin, yes it is working now. After i added column titles. https://live.datatables.net/kawehogo/1/edit
Great help. i will explore initcomplete option.
btw, does datatables have any inbuilt function to split one table into multiple tables ?
does datatables have any inbuilt function to split one table into multiple tables ?
No. How do you want to split the table into multiple tables? Such as do you want to move row data from one table to another?
I was trying to add a new column. but it didnt work.
All the columns need to be added before initialization or with columns.title. If you want to change the number of columns after initialization then you will need to destroy the Datatable using destroy() then reinit with the new header structure.
Answers
why rowgroup not working for me. in my webpage i dont have thead. is that the reason? i creaed eample like mine . https://live.datatables.net/vipifute/869/edit
Regardless of RowGroup Datatables requires a header. You can define it directly in HTML, use Javascript code to insert into the document before initializing Datatables or use
columns.title
define theth
required for each column. See the HTML requirements for more details.Kevin
thank you Kevin,I will use columns.title. But
is there a way to make that header invisible. I dont want header for that table. the first column has a text and second column has a number, third column has a characteristic. i want to group by characteristic. i dont want to say header for column as text and number. though i can use characteristic as column title for the third column.
https://live.datatables.net/kawehogo/1/edit
I made this change to add column title for each of the column, but it didnt work. what am I missing here?
Take a look at the browser's console. You are getting this error:
You are missing the closing
]
for thecolumnDefs
option.Try hiding the header in
initComplete
.Kevin
thanks Kevin, yes it is working now. After i added column titles.
https://live.datatables.net/kawehogo/1/edit
Great help. i will explore initcomplete option.
btw, does datatables have any inbuilt function to split one table into multiple tables ?
btw, I was trying to add a new column. but it didnt work.
https://live.datatables.net/kawehogo/4/edit
No. How do you want to split the table into multiple tables? Such as do you want to move row data from one table to another?
All the columns need to be added before initialization or with
columns.title
. If you want to change the number of columns after initialization then you will need to destroy the Datatable usingdestroy()
then reinit with the new header structure.Kevin