Hi Team,
We are using the tool bar section in the PQ grid and When we have edited the cell value and after applying the vertical scroll bar with pagination, history is resetting so the tool bar section goes to initial state(disabled state). So we couldn't able to see the latest changes in the toolbar . Could you please check the attachment of
NormalCellEdit.jpg and
CellEditWithPagination.jpg for you reference. Please assist us to persist the history on pagination.
Reference Link : https://paramquery.com/pro/demos/virtual_scrollPlease add the below snippets in the above reference link and you can see the History Resetting issue.
history: function (evt, ui) {
var $tb = this.toolbar();
if (ui.canUndo != null) {
$("button.changes", $tb).button("option", { disabled: !ui.canUndo });
}
if (ui.canRedo != null) {
$("button:contains('Redo')", $tb).button("option", "disabled", !ui.canRedo);
}
$("button:contains('Undo')", $tb).button("option", { label: 'Undo (' + ui.num_undo + ')' });
$("button:contains('Redo')", $tb).button("option", { label: 'Redo (' + ui.num_redo + ')' });
},
toolbar: {
items: [
{
type: 'button', icon: 'ui-icon-disk', label: 'Save', cls: 'changes', listener: function () {
self.saveChanges();
},
options: { disabled: true }
},
{
type: 'button', icon: 'ui-icon-cancel', label: 'Reset', cls: 'changes', listener: function () {
this.rollback();
this.history({ method: 'reset' });
},
options: { disabled: true }
},
{ type: 'separator' },
{
type: 'button', icon: 'ui-icon-arrowreturn-1-s', label: 'Undo', cls: 'changes', listener: function () {
this.history({ method: 'undo' });
},
options: { disabled: true }
},
{
type: 'button', icon: 'ui-icon-arrowrefresh-1-s', label: 'Redo', listener: function () {
this.history({ method: 'redo' });
},
options: { disabled: true }
},
{
type: "<span class='spanGridStatus'></span>"
}
]
},
Thanks