Function Repository Resource:

PagedGrid

Source Notebook

Display data in a grid split into pages

Contributed by: Paco Jain

ResourceFunction["PagedGrid"][data]

displays the 2d array data in a ten-row Grid, one page at a time, with buttons for moving between pages.

ResourceFunction["PagedGrid"][data,len]

uses pages of length len.

Details and Options

ResourceFunction["PagedGrid"] takes all the options of Grid, plus the option "ColumnLabels" that determine what column headings to use. For the default value of Automatic, the labels "col 1", "col 2", … are used.
PagedGrid returns a DynamicModule.

Examples

Basic Examples (1) 

Make a paginated grid of the first 100 primes:

In[1]:=
ResourceFunction["PagedGrid"][{#, Prime[#]} & /@ Range[100]]
Out[1]=

Scope (1) 

Limit the pages to length 4:

In[2]:=
ResourceFunction[
 "PagedGrid"][{#, Prime[#], CycleGraph[#, ImageSize -> Tiny]} & /@ Range[100], 4]
Out[2]=

Options (2) 

Make a paginated grid of the first 100 primes, using the option "ColumnLabels" to label the columns:

In[3]:=
ResourceFunction["PagedGrid"][{#, Prime[#]} & /@ Range[100], "ColumnLabels" -> {"n", "Prime[n]"}]
Out[3]=

Make a paginated grid of the first 100 primes, using custom Background coloring:

In[4]:=
ResourceFunction["PagedGrid"][{#, Prime[#]} & /@ Range[100], Background -> {None, {Gray, {Pink, Red}}}]
Out[4]=

Properties & Relations (1) 

If the first argument is a list but not a 2D array of expressions, PagedGrid will display a Column rather than a Grid:

In[5]:=
ResourceFunction["PagedGrid"][{a, b, {1, 2, 3}, f, g}]
Out[5]=

Requirements

Wolfram Language 14.0 (January 2024) or above

Version History

  • 1.0.0 – 20 November 2024

Related Resources

License Information