MeshWeaver.GridModel
                             
                            
                                2.4.0
                            
                        
                    See the version list below for details.
dotnet add package MeshWeaver.GridModel --version 2.4.0
NuGet\Install-Package MeshWeaver.GridModel -Version 2.4.0
<PackageReference Include="MeshWeaver.GridModel" Version="2.4.0" />
<PackageVersion Include="MeshWeaver.GridModel" Version="2.4.0" />
<PackageReference Include="MeshWeaver.GridModel" />
paket add MeshWeaver.GridModel --version 2.4.0
#r "nuget: MeshWeaver.GridModel, 2.4.0"
#:package MeshWeaver.GridModel@2.4.0
#addin nuget:?package=MeshWeaver.GridModel&version=2.4.0
#tool nuget:?package=MeshWeaver.GridModel&version=2.4.0
MeshWeaver.GridModel
Overview
MeshWeaver.GridModel provides the core grid model definitions and controls for the MeshWeaver ecosystem. This library defines the GridControl class that inherits from UiControl<GridControl> in the MeshWeaver.Layout project, allowing for consistent data grid rendering across different UI implementations.
Features
GridControlclass for UI implementations- Column definition models for grid configuration
 - Data structure models for grid rendering
 - Integration with the MeshWeaver UI control system
 
Usage
// Create a basic grid control
var gridData = new
{
    ColumnDefs = new[]
    {
        new ColDef { Field = "name", HeaderName = "Name" },
        new ColDef { Field = "age", HeaderName = "Age" },
        new ColDef { Field = "country", HeaderName = "Country" }
    },
    RowData = new[]
    {
        new { name = "John", age = 30, country = "USA" },
        new { name = "Sarah", age = 28, country = "Canada" },
        new { name = "Miguel", age = 32, country = "Mexico" }
    }
};
// Create the grid control
var gridControl = new GridControl(gridData);
// Configure the grid (optional)
gridControl = gridControl.WithClass("customer-grid")
                         .WithStyle(style => style.Width("100%").Height("500px"));
Advanced Grid Configuration
// Advanced configuration with grid options
var gridData = new
{
    ColumnDefs = new[]
    {
        new ColDef 
        { 
            Field = "name", 
            HeaderName = "Name",
            Filter = true,
            Sortable = true
        },
        new ColDef 
        { 
            Field = "age", 
            HeaderName = "Age",
            Filter = "agNumberColumnFilter",
            Sortable = true 
        },
        new ColDef 
        { 
            Field = "country", 
            HeaderName = "Country",
            Filter = true 
        }
    },
    RowData = GetCustomers(), // Your data source method
    DefaultColDef = new ColDef
    {
        Resizable = true,
        MinWidth = 100
    },
    Pagination = true,
    PaginationPageSize = 10
};
var gridControl = new GridControl(gridData);
Key Concepts
- Grid control architecture
 - Column definitions and configuration
 - Row data structure
 - Grid options and features
 - Data binding patterns
 
Integration with MeshWeaver
- Extends the MeshWeaver.Layout UiControl system
 - Provides models that UI implementations can render
 - Works seamlessly with Blazor, React, or other UI technologies
 
UI Implementations
This library provides the model definitions and controls, but does not include any UI rendering capabilities. For UI rendering, use one of the following implementations:
- MeshWeaver.Blazor.AgGrid - Blazor implementation using AG Grid
 
Related Projects
- MeshWeaver.Layout - Core layout and UI control system
 - MeshWeaver.Blazor - Blazor components
 
See Also
Refer to the main MeshWeaver documentation for more information about the overall project.
| Product | Versions Compatible and additional computed target framework versions. | 
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. | 
- 
                                                    
net9.0
- MeshWeaver.Layout (>= 2.4.0)
 
 
NuGet packages (2)
Showing the top 2 NuGet packages that depend on MeshWeaver.GridModel:
| Package | Downloads | 
|---|---|
| 
                                                        
                                                            MeshWeaver.Reporting
                                                        
                                                         Package Description  | 
                                                    |
| 
                                                        
                                                            MeshWeaver.Blazor.AgGrid
                                                        
                                                         Blazor component for AG Grid integration.  | 
                                                    
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | 
|---|---|---|
| 2.5.0 | 0 | 11/3/2025 | 
| 2.4.0 | 193 | 10/2/2025 | 
| 2.3.0 | 241 | 8/4/2025 | 
| 2.2.0 | 513 | 7/21/2025 | 
| 2.1.0 | 227 | 4/6/2025 | 
| 2.0.3 | 543 | 3/24/2025 | 
| 2.0.2 | 508 | 3/24/2025 | 
| 2.0.1 | 162 | 3/21/2025 | 
| 2.0.0 | 196 | 3/20/2025 | 
| 2.0.0-preview3 | 149 | 2/28/2025 | 
| 2.0.0-Preview2 | 146 | 2/10/2025 | 
| 2.0.0-preview1 | 136 | 1/6/2025 | 
| 1.0.1 | 187 | 10/8/2024 | 
| 1.0.0 | 153 | 10/8/2024 |