Orbyss.Blazor.Syncfusion.DynamicGrid
1.1.3
dotnet add package Orbyss.Blazor.Syncfusion.DynamicGrid --version 1.1.3
NuGet\Install-Package Orbyss.Blazor.Syncfusion.DynamicGrid -Version 1.1.3
<PackageReference Include="Orbyss.Blazor.Syncfusion.DynamicGrid" Version="1.1.3" />
<PackageVersion Include="Orbyss.Blazor.Syncfusion.DynamicGrid" Version="1.1.3" />
<PackageReference Include="Orbyss.Blazor.Syncfusion.DynamicGrid" />
paket add Orbyss.Blazor.Syncfusion.DynamicGrid --version 1.1.3
#r "nuget: Orbyss.Blazor.Syncfusion.DynamicGrid, 1.1.3"
#:package Orbyss.Blazor.Syncfusion.DynamicGrid@1.1.3
#addin nuget:?package=Orbyss.Blazor.Syncfusion.DynamicGrid&version=1.1.3
#tool nuget:?package=Orbyss.Blazor.Syncfusion.DynamicGrid&version=1.1.3
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
SfGridfeatures!
π 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
π Links
- π Website: https://orbyss.io
- π¦ This Package: Orbyss.Blazor.Syncfusion.DynamicGrid
- π¦ Other Packages: Orbyss.io
- π§βπ» GitHub: https://github.com/orbyss-io
- π Syncfusion Docs: Syncfusion Blazor UI
- π License: MIT
π€ 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 | Versions 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 is compatible. 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. |
-
net10.0
- Newtonsoft.Json.Schema (>= 4.0.1)
-
net8.0
- Newtonsoft.Json.Schema (>= 4.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
**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.