Datatable Inline edit on fixed column not working.

Datatable Inline edit on fixed column not working.

VidyaManjuanthaVidyaManjuantha Posts: 12Questions: 5Answers: 0

Datatable inline edit on fixed columns not working, whenever we try to edit fixed columns it is focusing on first coulmn which is not fixed.

In the above screenshot if we try to edit column 2 which is fixed, text box is opening in column 4 which is not fixed but has inline edit enabled.

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Can you link to a test case showing the issue please? It appears to be working okay in the example.

    Allan

  • VidyaManjuanthaVidyaManjuantha Posts: 12Questions: 5Answers: 0

    Hi Allan,

    I have referred above link and also referred to this discussion https://datatables.net/forums/discussion/38796/inline-edit-in-fixed-column where my issue seems similar. but my issue is not resolved yet.

    table.on('key-focus', function (e, datatable, cell) {
    if($(cell.node()).hasClass('editable-field')){
    editor.inline(cell.index(), { onBlur: 'submit', submit: 'changed' });
    }
    });

    I have above line of code where my $(cell.node()) points to 4rth column cell even if we click on 2nd columns. Apart from fixed columns inline edit is working for all other non fixed columns.

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    That thread is from 2016 and FixedColumns has been rewritten at least twice since then. Can you link to your page showing the issue so I can debug it please? The example I linked to shows it working okay, so I'd need a link to a page showing the issue.

    Allan

  • VidyaManjuanthaVidyaManjuantha Posts: 12Questions: 5Answers: 0

    Hi Allan,

    Sorry due to security reasons I can't give the link to page.
    I am able to get editable text box for third column but data from 5th column is fetched and displayed in second column.

    In the above example the value of editable field is component 1 but on click of the field the value of 5th column is shown in editable field.

  • kthorngrenkthorngren Posts: 21,330Questions: 26Answers: 4,951
    edited May 16

    I created a test case with your code snippet and it seems to work correctly:
    https://live.datatables.net/guwafemu/501/edit

    Can you update the test case to show the issue you are having?

    Are you using ColReorder?

    Kevin

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Also worth checking you are using the latest versions of all the DataTables libraries. My guess is you might be using old versions?

    The debugger can help you check versions.

    Allan

  • VidyaManjuanthaVidyaManjuantha Posts: 12Questions: 5Answers: 0

    Hi,

    I figured out why it was shifting the focus to other cell while we click on one cell and it was due to hidden columns that we had. Now I am facing another issue that when i try to edit fixed column cell, the original table cell getting edited instead of floating table. Due to this i am not able to see inline edit on fixed column cell.
    I have attached the version of JS that we are using and also the source of page.


  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    If you could link to the page showing the issue please, I'd be happy to take a look and see what I can discover.

    Allan

Sign In or Register to comment.