###Slice and dice your collections on a 2-dimensional grid.
The collectionGrid class lets you place a collection of elements on a virtual 2-dimensional grid, enabling you to easily extract single or multiple rows or columns of elements. This allows you to easily draw the grid in a graphical system (like a HTML table).
The collection grid consists of a number of cells in a 1-based coordinate system. The grid can be either horizontal (placing elements from left to right) or vertical (placing elements from top to bottom).
Here are some examples using a simple collection of characters ('A', 'B', 'C', 'D', and 'E').
Using a horizontal grid with three columns will give you:
(1, 1) => 'A' (1, 2) => 'B' (1, 3) => 'C'
(2, 1) => 'D' (2, 2) => 'E'
Using a vertical grid with three columns will give you:
(1, 1) => 'A' (1, 2) => 'C' (1, 3) => 'E'
(2, 1) => 'B' (2, 2) => 'D'