I want a code that move between row up and down in datatable with put two buttons and in last row go to next page.
I can write a code that move between row but i can't go to next page in last row. my code is here and it has two function for up and down between rows (tableWidgetVar is datatable widgetvar):
downRow = function (tableWidgetVar) {
if (PF(tableWidgetVar).selection.length === 0) {
PF(tableWidgetVar).selectRow(0);
return;
}
var index = PF(tableWidgetVar).originRowIndex;
var rows = PF(tableWidgetVar).tbody[0].childElementCount;
index++;
PF(tableWidgetVar).unselectAllRows();
PF(tableWidgetVar).selectRow(index);
PF(tableWidgetVar).originRowIndex = index;
},
upRow = function (tableWidgetVar) {
var rows = PF(tableWidgetVar).tbody[0].childElementCount;
var index = PF(tableWidgetVar).originRowIndex;
index--;
PF(tableWidgetVar).unselectAllRows();
PF(tableWidgetVar).selectRow(index);
PF(tableWidgetVar).originRowIndex = index;
},
have anyone idea for go to next datatable page in last row?