DataTables.responsive and column visibility problem.

DataTables.responsive and column visibility problem.

dachdach Posts: 6Questions: 2Answers: 0

Hi everyone,

I have a problem with column visibility and the new responive extension.
This is somewhat related to my previously unanswered post that you can find here : http://datatables.net/forums/discussion/22043/getting-properties-of-object-returned-by-serversideprocessing-even-if-not-used-in-any-column-v1-10#latest .

I have many hidden columns because I need to keep some extra informations from what is displayed by my dataTable. Then I hide these columns and I can access the values in the "object" parameter of the "rowCallback" event.

I wanted to use the new responsive extension which is really great but it seems that the extension hides the columns when resizing the window.
Then, when the child row is displayed by clicking on the "+" button, it's filled by all the hidden columns' informations including the columns that I didn't want to be shown.

I'm almost sure that this problem could be solved by customizing the responsive.details.renderer function but, anyway, this would also be solved if I would be able to access all the properties of the objects retrieved by the server even if these properties are not in any column.

Thanks for your help.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,512Questions: 1Answers: 10,472 Site admin
    Answer ✓

    I've just added a reply to your other question. The extra data doesn't need to go into a hidden column.

    Allan

  • dachdach Posts: 6Questions: 2Answers: 0

    Thank you but I have thought of another problem by using the colVis plugin.

    If a user does not want to display a column and hides it with the colVis button, the column is then hidden but the information will be appended in the row child with datatables.responsive.

    It's is not a big deal but I think it doesn't follow the colVis logic.

    Dach

  • allanallan Posts: 63,512Questions: 1Answers: 10,472 Site admin

    Yup - I don't think ColVis and Responsive are particularly compatible for this reason. They both use the same column visibility API from DataTables, so inevitably there will be some overlap between the functionality that they share.

    Allan

  • pansathishpansathish Posts: 12Questions: 2Answers: 0

    Hi Allan,

    I have mentioned some of the columns with bVisible:false configuration. But This options is not working with responsive plugin. i.e. Its showing all columns in datatable.
    Please let me know if any fixes

  • allanallan Posts: 63,512Questions: 1Answers: 10,472 Site admin

    @pansathish's comment refers to this thread: http://datatables.net/forums/discussion/22677 .

This discussion has been closed.