Inline - Tab Selected Columns only.

Inline - Tab Selected Columns only.

ddobbinsddobbins Posts: 8Questions: 2Answers: 0

Hello,
I looked but did not see an example of being able to inline edit and tab to select Columns only?
is that possible or not?
thanks in advanced.
David

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,336Questions: 26Answers: 4,951
  • ddobbinsddobbins Posts: 8Questions: 2Answers: 0

    Kevin,
    I have looked at that but I would like to combine it with this
    https://editor.datatables.net/examples/inline-editing/columns.html
    is that possible?

  • kthorngrenkthorngren Posts: 21,336Questions: 26Answers: 4,951
    edited March 2019 Answer ✓

    The example I posted shows tabbing between selected columns. You would use the keys.columns option to select the desired columns. In the example it has columns: ':not(:first-child)', which keeps from tabbing into the first column:

            keys: {
                columns: ':not(:first-child)',
                keys: [ 9 ],
                editor: editor,
                editOnFocus: true
            },
    

    Sounds like you probably want to use the same class for the keys.columns and the selector used here:

        $('#example').on( 'click', 'tbody td.editable', function (e) {
            editor.inline( this );
        } );
    

    Kevin

  • ddobbinsddobbins Posts: 8Questions: 2Answers: 0

    BOOOM!! Kevin you nailed it!
    The end result
    keys: { columns: '.editable', keys: [ 9 ], editor: editor, editOnFocus: true },
    thank you

This discussion has been closed.