1.1 KiB
1.1 KiB
Grids
Grid component integration tests for MgGridBase layout persistence, column rendering, and URL link functionality.
Key Files
TestMgGrid.cs-- Test infrastructure for grid testing:TestGridOrderItemDataSource-- DataSource with the 3-parameter constructor required byMgGridBase.OnInitializedAsyncviaActivator.CreateInstance.DynamicColumnAddingEventArgs-- Event args for customizing dynamically added columns.TestMgGridBase<...>-- Abstract generic test grid that overrides layout persistence with in-memoryDictionarystorage and auto-builds columns fromTDataItemproperties via reflection.TestMgGridOrderItem-- Concrete test grid bound toTestOrderItementities.
MgGridBaseTests.cs--[TestClass]with tests for:- Column width persistence across grid re-renders.
- Layout storage population after render.
- Separate layout keys for differently named grids.
- Master grid detection.
- Reflection-based column building (verifies Id, ProductName, Quantity columns).
MgGridDataColumn.UrlLinkrendering with token replacement.