Orbyss.Blazor.Syncfusion.DynamicGrid 1.0.0

dotnet add package Orbyss.Blazor.Syncfusion.DynamicGrid --version 1.0.0
                    
NuGet\Install-Package Orbyss.Blazor.Syncfusion.DynamicGrid -Version 1.0.0
                    
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="Orbyss.Blazor.Syncfusion.DynamicGrid" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Orbyss.Blazor.Syncfusion.DynamicGrid" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Orbyss.Blazor.Syncfusion.DynamicGrid" />
                    
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 Orbyss.Blazor.Syncfusion.DynamicGrid --version 1.0.0
                    
#r "nuget: Orbyss.Blazor.Syncfusion.DynamicGrid, 1.0.0"
                    
#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.
#:package Orbyss.Blazor.Syncfusion.DynamicGrid@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Orbyss.Blazor.Syncfusion.DynamicGrid&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Orbyss.Blazor.Syncfusion.DynamicGrid&version=1.0.0
                    
Install as a Cake Tool

Orbyss.Blazor.Syncfusion.DynamicGrid

Orbyss.Blazor.Syncfusion.DynamicGrid is a NuGet package that allows you to generate a Syncfusion SfGrid dynamically using JSON schemas.
The grid’s columns, filters, and localization are all defined through schemas, giving you a highly flexible and schema-driven way of rendering tables.


✨ Features

  • Define grid columns, filters, and translations entirely through JSON schema.
  • UI Schema (TableUiSchema) controls width, layout, alignment, labels, and filter types.
  • Supports initial sorting through schema (InitialOrdering).
  • Automatic localization support via TranslationSchema.
  • Plug in your own data provider via IDynamicGridDataProvider.
  • Open source and extensible — contribute missing SfGrid features!

🚀 Getting Started

1. Configure Syncfusion

In wwwroot/index.html:

<link href="_content/Syncfusion.Blazor.Themes/tailwind.css" rel="stylesheet" />
<script src="_content/Syncfusion.Blazor.Core/scripts/syncfusion-blazor.min.js" type="text/javascript"></script>

2. Register Services

In MauiProgram.cs:

// Register License Key
SyncfusionLicenseProvider.RegisterLicense("YOUR_LICENSE_KEY");

// Register Syncfusion Blazor Core services
builder.Services.AddSyncfusionBlazor();

// Register Dynamic Data Grid
builder.Services.AddSyncfusionDynamicGrid((sp) => new JTokenDataAdaptor(
        new MockDynamicGridDataProvider()
    )
);

⚠️ Note: If you use the built-in JTokenDataAdaptor, you must implement IDynamicGridDataProvider. Optionally, you could provide your own DataAdaptor all together

Example of IDynamicGridDataProvider implementation:

internal class MockDynamicGridDataProvider : IDynamicGridDataProvider
{
    private readonly JArray array = JArray.Parse("[...]");

    public Task<DynamicGridDataProviderResult> GetData(DataManagerRequest request, string? whereFilterHash, string? sortOrderHash)
    {
        var items = array.Where(token =>
        {
            var result = request.Where?.All(where =>
            {
                return where?.MatchesItem(token) != false;
            });

            return result != false;
        });

        if (request.Skip > 0 || request.Take > 0)
        {
            items = items.Skip(request.Skip).Take(request.Take);
        }

        if (request.Sorted?.Count > 0)
        {
            var sorted = request.Sorted[0];
            IOrderedEnumerable<JToken> ordered;

            if (sorted.Direction.Equals(nameof(SortDirection.Descending), StringComparison.OrdinalIgnoreCase))
            {
                ordered = items.OrderByDescending(x => $"{x.SelectToken(sorted.Name)}");
            }
            else
            {
                ordered = items.OrderBy(x => $"{x.SelectToken(sorted.Name)}");
            }

            items = ordered;
        }

        var result = new DynamicGridDataProviderResult(
            items,
            array.Count
        );

        return Task.FromResult(result);
    }
}

3. Provide Schema(s)

At minimum, you need a JSON schema for your data.

You may also provide:

  • TableUiSchema → Customize filters, widths, alignments, and layouts.
  • TranslationSchema → For localization.

4. Render the Grid

@* Parameters:
[Required] ItemsJsonSchema
[Required] TableUiSchema
[Optional] TranslationSchema
*@

<DynamicSfGrid 
    ItemsJsonSchema="@ExampleConstants.JsonSchema" 
    TableUiSchema="@ExampleConstants.TableUiSchema"
    TranslationSchema="@ExampleConstants.TranslationSchema" />

⚙️ Parameters

[Parameter] public Type CustomDataAdaptorType { get; set; } = typeof(JTokenDataAdaptor);
[Parameter] public IEnumerable<ItemModel> ToolbarItems { get; set; } = [];
[Parameter] public TableUiSchema? TableUiSchema { get; set; } = default!;
[Parameter] public TranslationSchema? TranslationSchema { get; set; }
[Parameter, EditorRequired] public JSchema ItemsJsonSchema { get; set; } = default!;
[Parameter] public DynamicGridOptions Options { get; set; } = DynamicGridOptions.Default;

🌍 Localization

Localization is handled via:

public static class DynamicGridCulture
{
    private static CultureInfo instance = new("en-US");

    public static event Action CultureChanged = default!;

    public static CultureInfo Instance
    {
        get => instance;
        set
        {
            instance = value;
            CultureChanged?.Invoke();
        }
    }
}

Whenever DynamicGridCulture.Instance changes, the grid automatically updates column labels, filters, and values.


⚡ Options

Using DynamicGridOptions you can configure pagination and virtualization:

public sealed class DynamicGridOptions
{
    public bool EnablePaging { get; init; }
    public bool EnableVirtualization { get; init; }
    public int? PageSize { get; init; }
    public VirtualizationOptions? VirtualizationOptions { get; init; }    

    public static readonly DynamicGridOptions Default = new();
}
public record VirtualizationOptions(
    string FixedHeight,
    bool EnableMaskRows = false,
    bool? EnableCache = null,
    int? InitialBlocksToLoad = null,
    int? MaximumBlocksToRender = null
);

📄 License

MIT License
© Orbyss.io



🤝 Contributing

This project is open source and contributions are welcome!

Whether it's bug fixes, improvements, documentation, or ideas — we encourage developers to get involved.
Just fork the repo, create a branch, and open a pull request.

We follow standard .NET open-source conventions:

  • Write clean, readable code
  • Keep PRs focused and descriptive
  • Open issues for larger features or discussions

No formal contribution guidelines — just be constructive and respectful.


⭐️ Found this useful? Give us a star and help spread the word!

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 115 8/17/2025

**Release: 17 August, 2025**

First release of Orbyss.Blazor.Syncfusion.DynamicGrid.
- Generate SfGrid from JSON schemas (Items, Table UI, Translation)
- Column definitions, filters, widths, alignment, initial ordering via schema
- Culture-aware labels and values (i18n)
- Paging and virtualization options via DynamicGridOptions
- JTokenDataAdaptor included; implement IDynamicGridDataProvider for custom sources

Not all SfGrid features are wrapped yet—please open issues or PRs to help expand coverage.