MeshWeaver.GridModel 2.0.3

dotnet add package MeshWeaver.GridModel --version 2.0.3
                    
NuGet\Install-Package MeshWeaver.GridModel -Version 2.0.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MeshWeaver.GridModel" Version="2.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MeshWeaver.GridModel" Version="2.0.3" />
                    
Directory.Packages.props
<PackageReference Include="MeshWeaver.GridModel" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MeshWeaver.GridModel --version 2.0.3
                    
#r "nuget: MeshWeaver.GridModel, 2.0.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=MeshWeaver.GridModel&version=2.0.3
                    
Install MeshWeaver.GridModel as a Cake Addin
#tool nuget:?package=MeshWeaver.GridModel&version=2.0.3
                    
Install MeshWeaver.GridModel as a Cake Tool

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:

See Also

Refer to the main MeshWeaver documentation for more information about the overall project.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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