Please disregard my last post submission to this thread, as I found the problem was a simple header/column mismatch in the subsequent table. Thank you!
can some one please help me here, i am trying to add filter on table (see attached), but its giving me Cannot set property '_DT_CellIndex' error. If someone can correct it i would appreciate it
You could use something like Row Details to display the specific interface data when the row is expanded.
Or you could use columns.render to render the data into the desired format. Meaning you could render each interface onto a new line in the row for the server. The server would have one row (not rowspan) and each interface in for that server would be in that row but on a new line (<br /> maybe).
Yup - fundamentally DataTables does not support colspan or rowspan in the tbody, exactly as Kevin says. There really isn't a good workaround for that I'm afraid. It simply isn't something that is supported. That might change in future, but not in the short term.
El problema '_DT_CellIndex' of undefined". lo solucione artesanalmente. Si la tabla de datos no tiene datos; pregunto y creo una fila en la tabla vacia. Ejemplo:
$lista_roles es resultado de una consulta a mi BD
......
$fila = ' ';
if (count($lista_roles) == 0) {
$fila .= '<tr><td>NO EXISTEN DATOS</td>;
$fila .= '<td></td>'; $fila .= '<td></td>'; $fila .= '<td></td>';
$fila .= '<td></td>'; $fila .= '<td></td>'; $fila .= '<td></td></tr>';
}
else {
foreach ($lista_roles as $roles) {
......
Oops, you got me! After your words I went online prepping a js-fiddle for you and reduced my table row count and figured it worked as expected. The problem was I had a rogue <tr> at the end of the table.
Thank you for your hard work, the component is just a masterpiece!
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Answers
In that case, I'd need a test case showing the issue, as I noted above, to be able to provide any help.
Allan
Please disregard my last post submission to this thread, as I found the problem was a simple header/column mismatch in the subsequent table. Thank you!
can some one please help me here, i am trying to add filter on table (see attached), but its giving me Cannot set property '_DT_CellIndex' error. If someone can correct it i would appreciate it
The problem is that Datatables doesn't support rowspan or colspan within the tbody of a table.
Kevin
Thanks Kevin
Is there a work around? please share
You could use something like Row Details to display the specific interface data when the row is expanded.
Or you could use
columns.render
to render the data into the desired format. Meaning you could render each interface onto a new line in the row for the server. The server would have one row (not rowspan) and each interface in for that server would be in that row but on a new line (<br /> maybe).Kevin
Yup - fundamentally DataTables does not support
colspan
orrowspan
in thetbody
, exactly as Kevin says. There really isn't a good workaround for that I'm afraid. It simply isn't something that is supported. That might change in future, but not in the short term.Allan
Is there a recommended solution when I have to have colspan in my table? Does anybody know of another solution that is similar and will work?
El problema '_DT_CellIndex' of undefined". lo solucione artesanalmente. Si la tabla de datos no tiene datos; pregunto y creo una fila en la tabla vacia. Ejemplo:
$lista_roles es resultado de una consulta a mi BD
......
$fila = ' ';
if (count($lista_roles) == 0) {
$fila .= '<tr><td>NO EXISTEN DATOS</td>;
$fila .= '<td></td>'; $fila .= '<td></td>'; $fila .= '<td></td>';
$fila .= '<td></td>'; $fila .= '<td></td>'; $fila .= '<td></td></tr>';
}
else {
foreach ($lista_roles as $roles) {
......
One more use case with the same error is when your
td
contains<div>
with icons...@phi1ipp - That shouldn't make any difference. Can you link to a page showing that problem please?
Allan
@allan,
Oops, you got me! After your words I went online prepping a js-fiddle for you and reduced my table row count and figured it worked as expected. The problem was I had a rogue
<tr>
at the end of the table.Thank you for your hard work, the component is just a masterpiece!
Hi @cintadewiamelia ,
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
Might be good to say you don't support colspan in the intro to the product to save ppl a half day's work
Fair point! It does say it in the FAQs, but I'll add it into the HTML requirements section of the installation documentation as well.
Allan