Datatables Editor: editing fixed columns not possible

Datatables Editor: editing fixed columns not possible

yves.wunderlin@senergy.chyves.wunderlin@senergy.ch Posts: 3Questions: 1Answers: 0

Hello Allan

I have a problem with editing of a fixed column: when I am clicking a cell in a fixed column (which is released for editing), the cell is disabled. After some clicks it can be edited, but the changes are discarded.

When I remove fixed column declaration for the column, editing works perfectly.

Datatables Editor version: 1.6.1

Could you please provide me with hints / links to samples?

Best regards
Pavel

Answers

  • allanallan Posts: 61,439Questions: 1Answers: 10,052 Site admin

    Hi Pavel,

    I presume this is with inline editing? This example shows Editor being used with inline editing and FixedColumns.

    Regards,
    Allan

  • yves.wunderlin@senergy.chyves.wunderlin@senergy.ch Posts: 3Questions: 1Answers: 0

    Hi Allan

    Yes, the effect is connected with inline editig.
    I have 5 fixed columns and the fouth one can not be edited.

    As long as two last columns of these five are not fixed any more, I can normally edit the fourth column.

    Do you have any ideas / recommendations?

    Best regards
    Pavel

  • tangerinetangerine Posts: 3,342Questions: 35Answers: 394

    Allan gave you an example. If that's not working for you, you will have to show your code.

  • allanallan Posts: 61,439Questions: 1Answers: 10,052 Site admin

    To be honest I don't really know what the problem is. How are you attempting to activate inline editing on the fourth column? Is it using a class selector, or something else?

    Thanks,
    Allan

  • yves.wunderlin@senergy.chyves.wunderlin@senergy.ch Posts: 3Questions: 1Answers: 0

    Hi Allan
    hi tangerine

    Thank's for your replies, I appreciate your help!

    Inline editing is activated in the same way as in the example.

    There are of course some other specifics in the project I am working on, so I would proceed with building up a simple example with a table and inline editing and check / compare the different behaviour.
    This way is understandable.

    My original question was posted rather to be sure if there are some basic generall restrictions / dependencies.

    If I find something "strange" I will let you know and show my example code.

    Best regards
    Pavel

  • allanallan Posts: 61,439Questions: 1Answers: 10,052 Site admin

    The example uses:

        $( table.table().container() ).on( 'click', 'tbody td:not(:first-child)', function (e) {
    

    i.e. any cell which is not the first child of a row is going to activate inline editing.

    If you don't want the second and third columns to be editable (for example, which you stated above) you would need to change the line of code. I think the best course of action would be to use a class name on the columns you want to be editable (columns.className) and then use:

        $( table.table().container() ).on( 'click', 'tbody td.editable', function (e) {
    

    See this example.

    Allan

This discussion has been closed.