Adding ColVis to a table that uses jEditable breaks the edit functions when columns are hidden.

Adding ColVis to a table that uses jEditable breaks the edit functions when columns are hidden.

bigsipperbigsipper Posts: 31Questions: 2Answers: 0
edited September 2014 in Free community support

I'm using ColVis on a DataTable with jEditable. If I use ColVis to hide a column I can not longer edit any other column in the table - the edited data seems to be 'shifted' by one (or more columns).
Some Googling shows that this was a known problem going back as far as 2011 ( https://code.google.com/p/jquery-datatables-editable/issues/detail?id=26 )

Has there really not been any fix done since then to make these two (independently awesome) plugins work together?!!!

Or is there a work around?

-Bigsipper.

Replies

  • bigsipperbigsipper Posts: 31Questions: 2Answers: 0

    Doh! Upon further review, seems like I just had to look closer at the fnGetPosition function.
    I changed this

    var aPos = oTable.fnGetPosition( this );
    oTable.fnUpdate( sValue, aPos[0], aPos[1] ); 
    

    to this, and it works with hidden columns as expected:

    var aPos = oTable.fnGetPosition( this );
    oTable.fnUpdate( sValue, aPos[0], aPos[2] ); 
    
This discussion has been closed.