MeshWeaver.GridModel
2.0.3
dotnet add package MeshWeaver.GridModel --version 2.0.3
NuGet\Install-Package MeshWeaver.GridModel -Version 2.0.3
<PackageReference Include="MeshWeaver.GridModel" Version="2.0.3" />
<PackageVersion Include="MeshWeaver.GridModel" Version="2.0.3" />
<PackageReference Include="MeshWeaver.GridModel" />
paket add MeshWeaver.GridModel --version 2.0.3
#r "nuget: MeshWeaver.GridModel, 2.0.3"
#addin nuget:?package=MeshWeaver.GridModel&version=2.0.3
#tool nuget:?package=MeshWeaver.GridModel&version=2.0.3
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
GridControl
class 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. |
-
net9.0
- MeshWeaver.Layout (>= 2.0.3)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on MeshWeaver.GridModel:
Package | Downloads |
---|---|
MeshWeaver.Blazor.AgGrid
Blazor component for AG Grid integration. |
|
MeshWeaver.Reporting
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.0.3 | 469 | 9 days ago |
2.0.2 | 442 | 9 days ago |
2.0.1 | 96 | 12 days ago |
2.0.0 | 132 | 13 days ago |
2.0.0-preview3 | 88 | a month ago |
2.0.0-Preview2 | 90 | 2 months ago |
2.0.0-preview1 | 79 | 3 months ago |
1.0.1 | 128 | 6 months ago |
1.0.0 | 103 | 6 months ago |