GridX Architecture
BeepGridPro internal architecture — helper decomposition, virtualization, selection strategies, grouping, filtering, and export pipeline
Table of Contents
Overview
BeepGridPro is the flagship data grid control, organized across multiple partial files. Internally, it decomposes functionality into 18 specialized helper classes, each handling a specific concern:
Helper Decomposition (18 Classes)
| Helper | Class | Responsibility |
|---|---|---|
| Layout | GridLayoutHelper | Column/row sizing, header layout, scrollbar positioning |
| Data | GridDataHelper | Data binding, value access, conversion |
| Render | GridRenderHelper | Cell painting, grid lines, header rendering |
| Selection | GridSelectionHelper | Multi-select, cell/row/column selection state |
| Input | GridInputHelper | Mouse clicks, hit testing, context menu |
| Scroll | GridScrollHelper | Scroll position tracking, wheel handling |
| ScrollBars | GridScrollBarsHelper | Scrollbar visibility and sizing |
| SortFilter | GridSortFilterHelper | Column sorting, filtering state |
| Edit | GridEditHelper | Cell editing mode, editor lifecycle |
| Theme | GridThemeHelper | Theme token application |
| Navigator | GridNavigatorHelper | Keyboard navigation, focus tracking |
| NavigatorPainter | GridNavigationPainterHelper | Navigation bar painting |
| Sizing | GridSizingHelper | Column resize, auto-size, DPI scaling |
| Dialog | GridDialogHelper | Filtering dialogs, inline criterion menus |
| Clipboard | GridClipboardHelper | Copy/paste, CSV format |
| ColumnReorder | GridColumnReorderHelper | Drag-to-reorder columns |
| KeyboardNavigator | GridKeyboardNavigator | Arrow keys, Tab, Home/End navigation |
| FocusManager | GridFocusManager | Focus tracking, accessibility |
Data Flow
DataSource (object)
└── GridDataHelper (Bind, GetValue, SetValue)
├── GridColumnConfigCollection (column definitions)
├── GridSortFilterHelper (sort/filter state)
└── GridRenderHelper (paint cells)
Optional Virtualization:
GridVirtualDataSource (IVirtualDataSource)
└── GridRowVirtualizer (window management)
└── GridDataHelper (fetch visible window)
Optional Grouping:
GridGroupEngine
└── IGridGrouper (sort + group)
└── GridGroupSummaryRow (aggregate row)Painting Pipeline
Grid painting is style-aware with 6 style families, each providing Header, Navigation, and Filter panel painters:
| Style Family | Header Painter | Navigation Painter | Filter Panel Painter |
|---|---|---|---|
| AG Grid | AGGridHeaderPainter | AGGridNavigationPainter | AGGridFilterPanelPainter |
| Ant Design | AntDesignHeaderPainter | AntDesignNavigationPainter | AntDesignFilterPanelPainter |
| Bootstrap | BootstrapHeaderPainter | BootstrapNavigationPainter | BootstrapFilterPanelPainter |
| Card | CardHeaderPainter | CardNavigationPainter | CardFilterPanelPainter |
| Compact | CompactHeaderPainter | CompactNavigationPainter | CompactFilterPanelPainter |
| DataTables | DataTablesHeaderPainter | DataTablesNavigationPainter | DataTablesFilterPanelPainter |
Advanced Features
- Virtualization — Large datasets (millions of rows) via IVirtualDataSource
- Selection — Cell, row, column, multi-range via ISelectionStrategy
- Grouping — Multi-level grouping with aggregate summary rows
- Filtering — Quick filter bar, advanced filter dialog, per-column filters
- Export — CSV, JSON, HTML built-in; Excel/PDF stubs (plugin-extensible)
- Editors — 7 cell editor types (Text, Numeric, Date, Combo, CheckBox, Masked, Generic)
- Accessibility — UIA provider pattern, screen reader support, keyboard navigation
Code Example
var grid = new BeepGridPro();
grid.DataSource = myDataTable;
grid.RowHeight = 28;
grid.GridStyle = "Bootstrap";
grid.MultiSelect = true;
grid.AllowColumnReorder = true;
// Virtual mode
var source = GridVirtualDataSource.FromList(myMillionRows);
grid.RowVirtualizer.DataSource = source;
// Grouping
grid.GroupEngine.AddDescriptor(new GroupDescriptor("Category"));
grid.GroupEngine.AddDescriptor(new GroupDescriptor("Region"));
// Export
grid.ExportEngine.Export(ExportFormat.Csv, "data.csv");