Pinned Rows and Columns
VirtualGrid provides a pinning mechanism for both its rows and columns. Through it, a given row can be pinned to the top or bottom of the grid. Respectively, a column can be pinned to the left or right side of VirtualGrid. Thus, they will not take part in the vertical or horizontal scrolling.
Pin Rows and Columns
The pin functionality can be controlled using the following methods exposed by the API of the control.
PinRowTop(int index)—Pins a row at a given index on the top.
Example 1: Calling the PinRowTop method
Figure 1: RadVirtualGrid with pinned row at the top
PinRowBotton(int index)—Pins a row at a given index to the bottom.
Example 2: Calling the PinRowBottom method
Figure 2: RadVirtualGrid with pinned row at the bottom
PinColumnLeft(int index)—Pins a column at a given index to the left.
Example 3: Calling the PinColumnLeft method
Figure 3: RadVirtualGrid with pinned column on the left
PinColumnRight(int index)—Pins a column at a given index to the right.
Example 4: Calling the PinColumnRight method
Figure 4: RadVirtualGrid with pinned column on the right
Unpin Rows and Columns
Unpinning an already pinned row or column can be achieved through the
UnpinRow(int index)—Unpins a row at a given index.
UnpinColumn(int index)—Unpins a column at a given index.
Example 5: Unpin methods usage
VirtualGrid exposes built-in commands for its pinning functionality. They can be accessed via the
RadVirtualGridCommands and executed using the
PendingCommands collection property of the VirtualGrid and its
The available commands are
UnpinColumn. Read more about the commanding support in the Commands Overview article.
Usage with Filtering and Sorting
The pinned rows feature is not supported when filtering or sorting is applied. In case you already have pinned rows and then apply filtering or sorting, the rows will get unpinned. After, the filtering and sorting is cleared, the previously pinned rows will be restored.