/

Visibility Toggles & Locked-Down Grids

Hide Add/Edit/Remove/search/pagination UI with the unset_*() family to build a read-only or kiosk-style grid.

Cosmetic, not security

Every unset_*() method hides exactly one existing UI affordance - it's purely cosmetic. The underlying REST endpoint is NOT disabled server-side; a visitor could still POST/PUT/DELETE directly against ajax_crud.php with the same permissions as before. Use ->pass_var()/->where() or a proper auth layer if you need an actually-enforced restriction. See Security: Blacklisting Tables & Columns for the real security boundary.

The unset_*() family

MethodHides
unset_add()The toolbar's Add button.
unset_edit()The per-row Edit button AND click-to-edit inline cell editing - both are "editing," so one toggle turns off both.
unset_remove()The per-row Remove/Delete button.
unset_search()The simple search box, the Columns/Advanced toggles, the advanced filter panel, the active-search chip summary, and every column's per-column header search input - the whole search subsystem as one unit.
unset_title()The <h1> page heading ->page() renders above the widget. No effect on ->render() (embed mode never had a heading) or the browser tab's <title>.
unset_pagination()The whole pagination bar (page number buttons, "Showing X to Y of Z," and the rows-per-page dropdown). The grid still only fetches one page's worth of rows at a time - there's just no UI to move between pages.
unset_limitlist()Just the rows-per-page dropdown, keeping the rest of the pagination bar. No visible effect if unset_pagination() already hides the whole bar.
unset_all()Every toggle above at once - Add/Edit/Remove, search, title, and pagination (bar + rows-per-page). Grouping and ->bulk_actions() are NOT part of this, since both are opt-in features of their own calls.

Example: a read-only kiosk grid

What's left after ->unset_all() is a read-only, unpaginated-looking display grid: the data, sortable column headers, and (if configured separately) grouping/bulk actions:

$xcrud = Xcrud::get_instance();
$xcrud->table('payments');
$xcrud->route('readonly-grid');
$xcrud->title('Read-Only / Locked-Down Grid');
$xcrud->columns('customerNumber,checkNumber,paymentDate,amount');
$xcrud->label('customerNumber', 'Customer #');
$xcrud->label('checkNumber', 'Check No.');
$xcrud->order_by('paymentDate', 'desc');
$xcrud->unset_all();

The result: no Add/Edit/Remove, no search, no pagination controls, no title bar of its own - but columns stay sortable and the data is still fully browsable, just not editable.