Editor - Multi User Editing

Editor - Multi User Editing

dpanscikdpanscik Posts: 125Questions: 32Answers: 0

I'm getting ready to map out my strategy for a multi user edit environment.

Im wondering if there is an API javascript hooks to help me do two things.
(1) find out if a specific row is currently being displayed
(2) update only a specific row without reloading the whole table

Answers

  • kthorngrenkthorngren Posts: 20,269Questions: 26Answers: 4,765

    find out if a specific row is currently being displayed

    One option is to use the rows() API with the row-selector as a function to return the rows matching a specific criteria. Use the selector-modifier of {page: "current"} to just check the rows on the current page. Use the count() APi to count the number of results.

    update only a specific row without reloading the whole table

    When using the Editor the Editor expects certain responses from the server to update the table. The responses allow the table to be updated without reloading. See the Client/server exchange docs for details.

    However there might be cases where using ajax.reload() is need to refresh other table data. This is solution dependent but not required for basic / default Editor behavior.

    Kevin

  • kthorngrenkthorngren Posts: 20,269Questions: 26Answers: 4,765

    Wait, maybe you are asking about how to notify user A that user B updated the table data. Is this what you are asking? I don't believe there is anything in Datatables for this. One option might be to use open to fetch the row being edited from the DB and compare for differences. Maybe use a timestamp that tracks the last update. You could then notify the user that there were changes or update the changed fields in the editor form.

    Kevin

  • dpanscikdpanscik Posts: 125Questions: 32Answers: 0

    Hi Kevin,

    Your first answer gave me the starting point I was looking for. Thank you.

    I'm developing your 2nd answer either using WebSockets or Microsoft signalR.

    David

Sign In or Register to comment.