How can I automatically move to a newly created record when using the editor?

How can I automatically move to a newly created record when using the editor?

anders59anders59 Posts: 13Questions: 5Answers: 0

Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:

Answers

  • kthorngrenkthorngren Posts: 21,250Questions: 26Answers: 4,929

    How can I automatically move to a newly created record when using the editor?

    Where do you want to move it to?

    Please provide more details of you requirements.

    Kevin

  • anders59anders59 Posts: 13Questions: 5Answers: 0

    How can I automatically move to a newly created record when using the editor?

  • anders59anders59 Posts: 13Questions: 5Answers: 0

    When my table is sorted by firstname and I insert a new record, such as "Joan," the new record is automatically inserted according to the alphabetical order. If I'm currently on the first page, I won't see this newly added record because it might be placed on a different page based on the sorting. I would have to manually search for it.

    Example:

    Assume the table is sorted by firstname.
    You have records like "Alice," "Bob," and "Charlie" on the first page.
    You add a new record with the firstname "Joan."
    The new record "Joan" is inserted into the correct alphabetical position, but it might be on a different page (e.g., the second or third page).
    If you are on the first page, you won't see the new record immediately, and you would need to manually navigate to the page where "Joan" is located.

  • kthorngrenkthorngren Posts: 21,250Questions: 26Answers: 4,929

    Now I understand. You can use either the page.jumpToData() or /row().show() plugins to jump to the page containing the row of interest.

    Kevin

  • anders59anders59 Posts: 13Questions: 5Answers: 0

    Thank you so much!

Sign In or Register to comment.