Overview
The grid that lists a resource's records
Every resource has an index page, which lists the resource's records in a grid. The resource's index page is located at /stellaradmin/{resourceSlug}, for example /stellaradmin/bookings.
To configure the grid, call Index() on the resource. The example below adds three columns, a search box, All and Pending scopes, a default sort, and pagination.
resource.Index(index =>
{
index.Columns(columns =>
{
columns.Add(booking => booking.Reference);
columns.Add(booking => booking.Traveller);
columns.Add(booking => booking.BookedAt, column => column.Sortable());
});
index.EnableSearch(term => booking => booking.Reference.Contains(term));
index.EnableScopes(scopes =>
{
scopes.Add("all", "All");
scopes.Add("pending", "Pending", booking => booking.Status == BookingStatus.Pending);
scopes.DefaultScope = "all";
});
index.DefaultSortBy(booking => booking.BookedAt);
index.EnablePaging();
});

You can find out more about configuring the various features of the index page in the following documentation:
- Columns explains how you can define and configure columns for the grid.
- Search shows how to add a search box that provides filter-as-you-type capabilities.
- Scopes adds tabs at the top of the grid that allow you to filter records based on predefined filters, for example viewing just the pending or confirmed bookings.
- Sorting and paging lets users sort the grid by a column and page through large lists of data.
- Row details allow users to expand a row to display additional information related to the record.
- Inline editing allow users to edit and add records inside the grid without navigating to a separate page.
- Widgets add blocks such as stats above, beside or below the grid.
Changing the title and labels
To change the index page's title, or the labels of its buttons and row actions, configure these properties in the Index() callback:
| Property | Description |
|---|---|
Title | The title that is displayed at the top of the index page. It defaults to the plural label of the resource, for example "Bookings". |
CreateLabel | The title for the button a user clicks to create a new record. Default to "Create". |
EditLabel | The tooltip displayed when a user hovers over the edit button inside the grid. Defaults to "Edit" and the singular resource label, for example "Edit Booking". |
ViewLabel | The tooltip displayed when a user hovers over the view button inside the grid. Defaults to "View" and the singular resource label, for example "View Booking". |
DeleteLabel | The tooltip displayed when a user hovers over the delete button inside the grid. Defaults to "Delete" and the singular resource label, for example "Delete Booking". |
The code sample below changes the index page title and the label of the Create button:
resource.Index(index =>
{
index.Title = "All bookings";
index.CreateLabel = "New booking";
});To change the defaults for all resources, see global labels.
Row actions
Each row may display a view, edit or delete action, depending on whether you've enabled the view page, the edit page or the delete action. These are enabled by calling the AllowView(), AllowEdit() or AllowDelete() methods on the resource builder.

