In this sample, you can switch the records from the Northwind Customers table and also display a single row per record and multiple rows per record. The sample also demonstrates formatting rows with alternating colors and highlighting the current row.
Features
Highlighting a record is handled in the PrepareViewStyleInfo handler.
To show records in an alternate color fashion, BackColor is set based on the GridBoundRecordState's rs.Position which is in the PrepareViewStyleInfo handler.
Span records using hyphen "-" for a covered cell and fullstop "." for a new row in the LayoutColumns() function of the GridHierarchyLevel class.
Grid events handled within GridRecordNavigationControl have to be subscribed in a PaneCreated event handler and unsubscribed in a PaneClosing event handler. The reason for this is that as the panes are opened and closed, the original GridControl or the GDBG may be destroyed. So, a one-time subscription cannot be applied to the initial GridControl events.
Interactive Features
You can highlight the column header of the current cell using the PrepareViewStyleInfo event handler.
You can also set background color of the alternate records using the same handler.