Pixata.Blazor.TelerikComponents 12.3.18

dotnet add package Pixata.Blazor.TelerikComponents --version 12.3.18
                    
NuGet\Install-Package Pixata.Blazor.TelerikComponents -Version 12.3.18
                    
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="Pixata.Blazor.TelerikComponents" Version="12.3.18" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Pixata.Blazor.TelerikComponents" Version="12.3.18" />
                    
Directory.Packages.props
<PackageReference Include="Pixata.Blazor.TelerikComponents" />
                    
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 Pixata.Blazor.TelerikComponents --version 12.3.18
                    
#r "nuget: Pixata.Blazor.TelerikComponents, 12.3.18"
                    
#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 Pixata.Blazor.TelerikComponents@12.3.18
                    
#: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=Pixata.Blazor.TelerikComponents&version=12.3.18
                    
Install as a Cake Addin
#tool nuget:?package=Pixata.Blazor.TelerikComponents&version=12.3.18
                    
Install as a Cake Tool

Pixata.Blazor.TelerikComponents Pixata.Blazor.TelerikComponents Nuget package

Pixata

This package complements the Pixata.Blazor package, and adds components that rely on the Telerik components for Blazor. These were split off into their own package to enable those without a licence for Telerik to use the other components.

A Nuget package is available for this project.

Note that as of version 12.2.0, the major and minor package versions will correspond to the version of the Telerik.Blazor package that is required. The patch version will be used for updates to this package. The build number will indicate my own internal versioning. Thus, version 12.2.0 is based on the Telerik Blazor package version 12.2.x, where x is my own incremental build number.

The components

TelerikGrid with automatic save and restore of state

Saving and restoring state is a very useful feature, as it allows the grid to return to its previous state when the user left the page. Handling this manually is not major, but painful.

I wrote the TelerikGridWithState component as almost drop-in replacement for the standard TelerikGrid, but preserves the grid state in local storage. If you use virtualisation, then the current skip and take will also be restored.

All you need to do is set a value for the StorageKey parameter and you're done.

In the unlikely event that you need to handle OnStateInit or OnStateChanged events, you can do so by using the OnStateInitPre, OnStateInitPost, OnStateChangedPre, and OnStateChangedPost event handlers. These allow you to run your own code before or after the component's state handling.

Extension method to improve the performance of the Telerik Blazor grid

Moved. As of version 12.3.18, TelerikGridHelper (args.GetData<T>()), along with TelerikGridFilterResults and TelerikGridFilterOptions, has moved to the new Pixata.AspNetCore.Telerik package, where it is documented. It queries a database, so it needed EF Core, Microsoft.EntityFrameworkCore.SqlServer and Microsoft.Data.SqlClient, which meant every client-side app using these components downloaded a SQL Server driver it could never use. This package no longer references any of them.

If you use it, reference Pixata.AspNetCore.Telerik from your server project and change using Pixata.Blazor.TelerikComponents.Helpers; to using Pixata.AspNetCore.Telerik.Helpers;. Nothing else changes.

TelerikGridBoolFilter

Whilst row filtering on Telerik grids is, in general, pretty brilliant, the one thing that lets it down (in my opinion anyway, feel free to disagree) is the way the controls on bool columns are handled. By default, a bool column's row filters will show a dropdown for the value, and a button to clear the filter. Apart from the fact that this takes up far more space than the column needs, the button is superfluous, as the dropdown has an "(All)" entry, which isn't even selected by default. Also, the dropdown values are "is true" and "is false", which is not the way the average user thinks.

So, I decided something neater was required. The TelerikGridBoolFilter component is an easy way to filter bool columns. Usage is very simple...

<GridColumn Field="@nameof(WeatherForecast.Rain)"
            Width="100px"
            Title="Rain?"
            FilterCellTemplate="@TelerikGridBoolFilter.Filter()" />

This is based on the standard Blazor sample page that shows weather forecasts, to which I added a bool property called Rain. The column header now just shows a checkbox, which by default is in the indeterminate state, meaning show all, but can be checked or unchecked to filter the column.

LocalisationHelper

The Telerik Blazor components supply a default text for many situations. For example, if a grid does not contain any data, then it will show the rather geeky message "No records to display". Overriding these messages with your own text is not hard, but is now even easier with the LocalisationHelper class in this package.

Basic usage is as simple as adding the following line to any <code>Program.cs</code> file in your app..

builder.Services.AddSingleton(typeof(ITelerikStringLocalizer), typeof(LocalisationHelper));

However, that will only override two of the messages (the ones that annoy me the most)...

  • "No records to display" in grids now shows "Sorry, nothing matched your filters. Please widen your search criteria"
  • When binding a dropdown (or any component that allows filtering) to an <code>enum</code>, the first entry in the dropdown is changed from "Select a value" to "All" which I think is more sensible. It's also shorter, which is an advantage when your values are short.

However, adding your own messages, or modifying my choice of the above is easy...

LocalisationHelper.Values["DatePicker_Open"] = "Open Sesame";
builder.Services.AddSingleton(typeof(ITelerikStringLocalizer), typeof(LocalisationHelper));

As the class is static, you only need to do this once.

You can see a list of all messages on (Telerik's web site).

Form components

These were writen to make it quicker to create forms in Blazor. They follow the same layout as the ones in Pixata.Blazor, which was originally built with Bootstrap's grid and form classes. As of v12.3.17 they no longer need Bootstrap, but they do need the stylesheet that comes with Pixata.Blazor, so add this to your _Host.cshtml, App.razor or index.html...

<link rel="stylesheet" href="_content/Pixata.Blazor/pixata.css" />

See the styling section of the Pixata.Blazor readme for what's in it and how to fit it to your own theme.

If you look at the form page on the sample web site you can see the usage.)

Warning

The package relies on the Telerik.Blazor Nuget package. If you don't have a subscription with Telerik, you can get a 30-day trial version from them.

Sample project

I have added a Blazor web project to the repository, and intend to use that to try out and demonstrate the components. At the moment, it's a just-out-of-the-box template project, but should hopefully be expanded to include sample usage of the components.

Note that the sample web site is not fully working, and as of 17th Sept '24 isn't being updated when the code changes. I would like to sort this out at some point, but don't have the time right now, so don't hold your breath!

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
12.3.18 43 9/3/2026
12.3.17 101 8/25/2026
12.3.16 220 8/3/2026
12.3.15 126 7/16/2026
12.3.14 101 7/16/2026
12.3.13 109 7/16/2026
12.3.12 150 6/25/2026
12.3.11 130 6/24/2026
12.3.10 124 6/21/2026
12.3.9 146 6/5/2026
12.3.8 128 6/5/2026
12.3.7 127 6/5/2026
12.3.6 123 6/1/2026
12.3.5 133 5/12/2026
12.3.4 130 5/10/2026
12.3.3 199 3/23/2026
12.3.2 168 2/23/2026
12.3.1 122 2/23/2026
12.3.0 129 2/23/2026
12.2.0 173 1/12/2026
Loading failed