17. Local Grid Pagination

The Problem

When a grid already has its complete dataset, pagination should happen locally without repeated server calls.

The React Difficulty

React has no built-in business grid pagination. The component or grid library must hold page state and slice the dataset.

React Approach

const [page, setPage] = useState(1);
const pageSize = 20;
const visible = rows.slice((page - 1) * pageSize, page * pageSize);

return <Grid rows={visible} />;

MS Approach

ManySet provides a direct runtime-oriented approach for this recurring business-application task.

const g = ms.form.grid();
g.data = localRows;
g.paging = { mode: "local", pageSize: 20 };

Why this way is useful in business applications :

The comparison is intended to show where ManySet supplies a business-application abstraction around a recurring task, while keeping HTML and JavaScript visible and directly usable.

Key Point :

ManySet reduces the amount of framework-specific composition required for this particular task, without requiring the React/Angular mechanism to be represented as inherently wrong or incapable.