🚀 Welcome to MDriven Learn –  MDriven is now on Discord!  Don’t miss the latest Release Notes.
Nesting.ClientSortable
This page was created by Stephanie on 2023-05-19. Last edited by Wikiadmin on 2026-07-29.

You can use Nesting.ClientSortable on a table or grid nesting when all rows are loaded in the client and users need to sort the displayed rows in the client.

What Nesting.ClientSortable does

Nesting.ClientSortable makes the whole table client-sortable by default. Client-side sorting changes the order of rows that have already been sent to the client; it does not run a new database search.

For example, a ViewModel shows the complete set of 30 order lines for one order. With Nesting.ClientSortable, a user can sort those 30 displayed lines by a column. Because the complete set is present in the client, the sorted result represents all order lines in that list.

When to use it

Use Nesting.ClientSortable when the table represents a complete, manageable collection that is already available in the client.

Typical use:

  • A list of objects related to the object currently shown, where all relevant rows are displayed.
  • A small collection such as the lines of one order, attendees for one meeting, or addresses for one customer.

Do not use client sorting as a replacement for database ordering when the user is viewing only part of a larger result.

Important limitation: only loaded rows are sorted

Client-side sorting operates on the rows currently sent to the client. It cannot sort records that have not been loaded.

For example, a customer search finds more than 1,000 customers named Adam but displays only 100 rows. Sorting those 100 rows by last name in the client does not produce the first 100 customers by last name across all matching customers. The search must be rerun with the new ordering in the database.

Use server-side ordering when the table uses pagination, server-side filtering, or a partial search result. See Documentation:Tables, search and ordering for the distinction between client sorting and ordering a search result.

Use it with table nestings

A nesting is an element placed within a ViewModel; in MDriven Designer, nestings are shown in blue inside the top-level ViewModel, which is shown in green. Apply Nesting.ClientSortable to the nesting that renders the table or grid you want users to sort.

Keep row selection separate from sorting:

  • Use Nesting.MultiSelect when users must select multiple rows and act on the vSelected collection.
  • Nesting.CellSelect is a native Windows feature for selecting cells rather than complete rows; it is not available in the web client.

For general behavior of lists, tables, and grids, see Documentation:Tables and Grids.

See also