1) Repeating Panel vs. 2) Data Row Panel: how to choose

When (i.e., by what criteria) would you choose to use one over the other?

The data row panel is used with the data grid and is useful when you are displaying information in a tabular way with rows and columns. As shown here: https://anvil.works/blog/data-grids

Repeating panel is useful when you want to customize the design/layout of the repeating component.

A repeating panel that contains a flow panel with labels displaying information would have a similar appearance to the data row panel but wouldn’t be automatically paginated like a data row panel used in cooperation with the data grid.

3 Likes

In addition to @joinlook

When adding data to a DataGrid, I usually use Repeating Panels and Data Row Panels.

The way I think of it in general is:

  • Use the Repeating Panel for rows where UI elements are repeated.
  • Use Data Row Panel for more complex designs (e.g., pinned rows, additional/nested headers)

You may even add Data Row Panels inside of a Repeating Panel (as in the CRUD tutorial). Data Row Panels are “column aware” and this makes it easy to drop components into their respective columns.

Here is a nice schematic from Shaun’s tutorial. I think this represents a common design (other than the deeply nested Repeating Panel which is maybe a bit more uncommon). That is, a Data Grid with fixed and repeating elements.

4 Likes

This helps a lot. And thanks for reminding me of that tutorial. :grin:

My pleasure. I struggle with the difference between rep panels and data row panels too! Great question to have on the forum.