Note that there are some explanatory texts on larger screens.

plurals
  1. POjquery datatables plugin with fixed columns and hidden columns
    primarykey
    data
    text
    <p>Im having a problem using Fixed Columns plugin for Datatables.</p> <p>When I try to freeze the right column and i have hidden columns in the datatable it wont show the rigth colum. When I dont have hidden columns in the datatable the fixed column is shown correctly.</p> <p>One more thing im using server-side precessing.</p> <p>Here is the code im trying to use.</p> <pre><code> "sScrollX": "100%", "sScrollXInner": "130%", "bScrollCollapse": true, "fnInitComplete": function () { var resultadosFC = new FixedColumns( resultados, { "iLeftColumns": 0, "iRightColumns": 1, "sHeightMatch" :"auto" } ); }, "sPaginationType": "full_numbers", "bStateSave": false, "iCookieDuration": 3600, "bJQueryUI": true, "bProcessing": true, "bServerSide": true, "sAjaxSource": "index.php?option=com_entidades&amp;task=getSolicitudes", "aaSorting": [[0,'desc']], "bAutoWidth": false, "aoColumns": [ null, { "fnRender": function(oObj) { if(oObj.aData[1]!=null) return moment(oObj.aData[1], "YYYY-MM-DD HH:mm:ss").format("DD/MM/YYYY hh:mm:ss a"); else return null; } }, { "fnRender": function(oObj) { if(oObj.aData[2]!=null) return moment(oObj.aData[2], "YYYY-MM-DD HH:mm:ss").format("DD/MM/YYYY hh:mm:ss a"); else return null; } }, { "fnRender": function(oObj) { if(oObj.aData[3]!=null) return moment(oObj.aData[3], "YYYY-MM-DD HH:mm:ss").format("DD/MM/YYYY hh:mm:ss a"); else return null; } }, null, null, null, null, //when i hide the columns the fixed column doesnt show { "bVisible": false }, { "bVisible": false }, //this is the column i want to freeze { "bSortable": true, "bSearchable": false, "sWidth" : "35px", "fnRender": function(oObj) { var reg_completo = oObj.aData[8]; if( reg_completo == 'I' ){ return '&lt;div align="center"&gt;&lt;label style="color:red"&gt;I&lt;/label&gt;&lt;/div&gt;'; } else if( reg_completo == 'C'){ return '&lt;div align="center"&gt;&lt;label style="color:green"&gt;C&lt;/label&gt;&lt;/div&gt;'; } } }, { "bSortable": false, "bSearchable": false, "fnRender": function(oObj) { var id = oObj.aData[0]; var codEstadoSolicitud = oObj.aData[10]; var regUserID = oObj.aData[11]; var acciones=""; if(canDoEditarCrearSolicitud &amp;&amp; codEstadoSolicitud == constSolicitudBorrador &amp;&amp; jSigeUserID == regUserID) acciones=acciones + linkEditar + linkEliminar + linkEnviar; else acciones=acciones + linkVer; return acciones.replace(/\$var/g,id); } } ] }); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload