Skip to content

Select and Update Matching Server Rows

Select Select all matching orders, then uncheck Select Desk lamp. Choose Review selection. The count includes matching rows on page two. Choose Mark selected ready, then open page two to see the updates.

Register RemoteRowSelectionPlugin alongside remote pagination, infinite scrolling, or server-side grouping. Set grid.remoteRowSelection before mounting.

grid.remoteRowSelection = {
getRowId: (row) => row.id,
preview: (request, signal) => orders.previewBulk(request, signal),
commit: (request, signal) => orders.applyBulk(request, signal),
};
// After the grid is ready and the plugin instance is available
grid.columns = [
selection.createCheckboxColumn('select', {
all: 'Select all matching orders',
row: ({ model }) => `Select ${model.item}`,
}),
...grid.columns,
];
const review = await selection.previewSelection();
// Show the server-confirmed count and wait for the user to confirm.
if (review?.count) {
await selection.applyBulkUpdate([{ prop: 'status', value: 'Ready' }]);
}

The endpoint receives a detached query and either explicit row IDs or an all-matching rule with exclusions. Page changes preserve selection. Changes to the query or loader clear it. Return an opaque revision from the preview endpoint for the exact reviewed targets.

On commit, authorize the fields and target rows, check the count and revision, and apply the update atomically. Deduplicate by operationId. To retry a transport failure, submit the same assignments before requesting another preview. After acceptance the plugin refreshes the row source. Use getLastRefreshSucceeded() to distinguish a saved update from a failed refresh.