Inline Edit with input and dropdown with update button

Inline Edit with input and dropdown with update button

HueseniglobalHueseniglobal Posts: 27Questions: 9Answers: 0

Hello,

  1. Can you please give some link of example where you can have some functionality with inline update with update and delete button?

  2. I have tried my way for enline editing and its works, but when i hit submit or delete button data update but after updation, grid goes on first page. Like if i have update row from 3rd page then after editing it goes on first page. So how can i stay on same page while updating.

Thanks

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @Hueseniglobal ,

    1. The best bet is to look at the inline examples, there's loads there, like this one that does have a submit button.

    2. That's probably because of the ordering. If you're ordering by the first name field, for example, and you change "Anne" to "William", then the modified entry will be moved to where it fits within that ordering.

    Cheers,

    Colin

  • kthorngrenkthorngren Posts: 21,336Questions: 26Answers: 4,951

    So how can i stay on same page while updating.

    I'm interpreting this differently than Colin. Sounds like when you submit you have an event handler performing a draw(). If this is the case then for point #2 you can use .draw(false) to stay on the same page.

    Kevin

  • HueseniglobalHueseniglobal Posts: 27Questions: 9Answers: 0

    @colin, I think you have provided example is paid version. Isn't it? If no then we can use it. Thats why i have asked you to provide some excample from your DT tool. Do you have any example with inline editing?

    @kthorngren , Thanks for the reply, I will try this and let you know

  • HueseniglobalHueseniglobal Posts: 27Questions: 9Answers: 0

    @kthorngren
    I have tried to use draw but not getting success. First i have tried this code "table.row("#" + checkid[c]).remove().draw(true);" it will remove line and goes on first page. then i have tried table.row("#" + checkid[c]).remove().draw(false); and then it will not remove lines from tables. it stays on second page only

  • colincolin Posts: 15,240Questions: 1Answers: 2,599
    edited July 2018 Answer ✓

    Hi @Hueseniglobal ,

    Yes, you're correct, Editor is a paid version. All the examples for DataTables are on this page. Editing isn't include there, because that functionality is part of Editor.

    Cheers,

    Colin

  • kthorngrenkthorngren Posts: 21,336Questions: 26Answers: 4,951

    There isn't enough information to go on. Can you create a test case showing the issue so we can help debug?
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Kevin

This discussion has been closed.