AyCode.Blazor/AyCode.Blazor.Components/Components/Grids/README.md

1.7 KiB

Grids

Core grid system built on DevExpress DxGrid with SignalR-based data binding, CRUD operations, layout persistence, fullscreen mode, and an info panel for row details.

Key Files

  • MgGridBase.cs -- MgGridBase<TSignalRDataSource, TDataItem, TId, TLoggerClient>, the main abstract grid component. Extends DxGrid and binds to an AcSignalRDataSource for real-time CRUD via SignalR message tags. Supports master-detail hierarchy (ParentGrid, GetRootGrid), row navigation, edit state tracking, layout auto-save/load/reset via localStorage, and fullscreen toggle.
  • MgGridSignalRDataSource.cs -- MgGridSignalRDataSource<TDataItem, TId>, a GridCustomDataSource that wraps AcSignalRDataSource. Returns local data instantly for previously-seen filter criteria while refreshing from the server in the background. Handles filter, sort, paging, unique values, and summary calculations locally.
  • MgGridDataColumn.cs -- Extends DxGridDataColumn with InfoPanel visibility/order parameters and a UrlLink template that renders cells as hyperlinks with {Property} placeholder substitution via compiled accessors.
  • MgGridInfoPanel.razor.cs -- MgGridInfoPanel component implementing IInfoPanelBase. Displays focused-row details with responsive column layout, edit/view mode, sticky positioning via JS interop, and cached column/display-text lookups.
  • MgGridToolbarBase.cs -- Extends DxToolbar with Grid, RefreshClick, and ShowOnlyIcon parameters.
  • GridEditMode.cs -- MgGridEditState enum: None, New, Edit.
  • MgGridHelper.cs -- Placeholder helper (empty).
  • MgGridToolbarHelper.cs -- Placeholder helper (empty).
  • MgGridInfoPanelHelper.cs -- Placeholder helper (empty).