Customizing your grids

Overview of an admin dashboard

Based on the grid generated by default, our goal here is to obtain a nicely customized grid with autocomplete filters and more!

Overview of an admin dashboard

Let's imagine we have the following grid.

Fields

Overview of an admin dashboard

Let's clean up our grid and remove unnecessary fields.

We have removed the description, endsAt and track grid fields.

Overview of an admin dashboard

Adding the speaker avatar using Twig field

Overview of an admin dashboard

Now, let's add the speaker avatar into our talk grid.

Filters

Adding an autocomplete filter

Overview of an admin dashboard

We'd like to filter our talks by a specific speaker.

So, let's start by creating a FormType following the Symfony UX Autocomplete Documentation

Now we need to create our custom Grid filter.

Then, we add our SpeakerFilter to our grid.

Last updated