How to get Id value by clicking Edit button on the same row of DataTable

后端 未结 4 425
滥情空心
滥情空心 2021-01-15 08:32

I use jQuery Datatable for listing records and add an Action button (Edit) for editing the record on a modal dialog. If I select a row I can get th

4条回答
  •  深忆病人
    2021-01-15 09:16

    Assign the row-id(s) to the edit buttons as well, write click events for the edit buttons which, based on the id of the button clicked on, triggers the edit functionality / view.

    You could assign the row-id(s) to the buttons either when rendering itself, or write a small function that does the same on page load.

提交回复
热议问题