MentorAgent Docs
Menu

ReferencePackage: Novior.MentorAgent.Abstractions

MentorGridOptions class

The MentorGridOptions class of Novior.MentorAgent.Abstractions.Interfaces: How MentorGridExtensions.RegisterGrid reads a grid. A column is named by its…

View as Markdown
On this page

How MentorGridExtensions.RegisterGrid reads a grid. A column is named by its property, as written in the row (nameof(Order.Total)) or as the model sees it (total); a name that is no column of the grid throws when the grid is registered.

Namespace: Novior.MentorAgent.Abstractions.Interfaces. Package: Novior.MentorAgent.Abstractions.

public sealed class MentorGridOptions

Terminal
dotnet add package Novior.MentorAgent.Abstractions

public MentorGridOptions()

public bool Filter { get; set; }

Whether the grid has a filter field in the page, data-mentor-id="<grid>.filter": then the model gets filter_<grid>, and opening a row writes its key there first when the row is not shown. True by default.

public MentorGridOptions IncludeSensitive(params string[] columns)

Lets these sensitive columns be sorted by, which a grid leaves out unless they are named here. A sensitive column is never the grid's key: the model would have to write its value to open a row.

public MentorGridOptions Selector(string part, string selector)

The CSS selector of a part of the grid in the page, in place of its data-mentor-id. The part is what follows "<grid>." in that data-mentor-id: row (the rows), cell.<key> (the key's cell, inside a row), open (what opens a row, inside it), filter, or sort.<column> (the header clicked to sort by the column). A grid whose rows and headers take no attribute, such as a QuickGrid, is given its selectors here.

public MentorGridOptions Sortable(params string[] columns)

The columns the grid sorts by, in place of all its columns of a simple type that are not sensitive. None: the model gets no sort_<grid>, because the page sorts by nothing.