Open vec435 opened 4 years ago
Here is the approach I've taken to do this in the past. Following the paradigm of including a clickable item on the row to open a child table, I give that clickable item a class name say .openChildTable
Then I add a recordsLoaded callback.
recordsLoaded: function (event, data) {
var foundRow = $(this).jtable('getRowByKey',targetRowKey);
if (foundRow) foundRow.find(".openChildTable").trigger('click');
}
targetRowKey needs to be defined before the table is loaded, and if the row in on the page, jquery delivers a click on the child table element rather than the user.
Thank you for answer!
Четверг, 25 марта 2021, 11:25 +03:00 от Malcolm Parsons @.***>: Here is the approach I've taken to do this in the past. Following the paradigm of including a clickable item on the row to open a child table, I give that clickable item a class name say .openChildTable Then I add a recordsLoaded callback. recordsLoaded: function (event, data) { var foundRow = $(this).jtable('getRowByKey',targetRowKey); if (foundRow) foundRow.find(".openChildTable").trigger('click'); }
targetRowKey needs to be defined before the table is loaded, and if the row in on the page, jquery delivers a click on the child table element rather than the user. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub , or unsubscribe .
владимир чаклин
Can I create jtable with opened child records? Thanks