I have no idea when this started but I suspect when we upgraded to 11.x control suite.
<GridColumn Field=@nameof(BookingEquipmentCommodityModel.ItemCount) Title="Count" Width="1.5rem" />As you can see, there is no numeric template and this is a simple GridColumn, but I'm getting increment arrows on any column that is numeric (Int, Decimale, Double, etc.)?
I don't want them and have no idea why I'm getting them since I don't define the column with a template for TelerikNumericTextBox??
In my attempt (which failed) to work-around this issue, I setup a template for the column using TelerikNumericaTextBox to see I could disable the arrows ... and that didn't work either?
<GridColumn Field=@nameof(BookingEquipmentCommodityModel.CommodityWeight) Editable="true" Title="Weight" Width="3rem">
<Template Context="cwContext">
@{
var cw = (BookingEquipmentCommodityModel)cwContext;
}
<TelerikNumericTextBox @bind-Value="@cw.CommodityWeight" Arrows="false"></TelerikNumericTextBox>
</Template>
</GridColumn>
still get the arrows?
Help?

I have no problem with adjusting filter values (trim white space) when the Grid uses OnRead event:
private async Task OnBookingGridRead(GridReadEventArgs args)
{
// Are any filters selected, if so we need to work from the filtered List
if (args.Request.Filters.Count > 0)
{
await TrimFilters(args.Request.Filters);
and the cycle thru filter values and trim them:
// Removes white space (aka Trim) on any filter input
private Task TrimFilters(IList<IFilterDescriptor> filters)
{
// Cycle the filters and trim Values
foreach (var filterDescriptor in filters)
{
switch (filterDescriptor)
{
case FilterDescriptor singleFilterDescriptor:
// Only one filter
singleFilterDescriptor.Value = singleFilterDescriptor.Value.ToString()?.Trim();
break;
case CompositeFilterDescriptor compositeFilter:
{
foreach (var subFilter in compositeFilter.FilterDescriptors)
{
if (subFilter is FilterDescriptor singleSubFilter)
{
singleSubFilter.Value = singleSubFilter.Value.ToString()?.Trim();
}
}
break;
}
}
}
return Task.CompletedTask;
}All good works fine ... BUT ... if the Grid is not using OnRead (using Data=), how can I accomplish the same task of removing white space (trim) from user filter input values?
Hi all,
I'm using the GridState, and in particular, the GridColumnStates, to restore user-defined column sizes when getting back to a page that contains a grid.
While it's cool that a state can easily be retrieved and set, what I dislike about it is that column widths are treated in absolute sizes (pixels) instead of relative (%). When a state is restored to a different overall resolution (affecting the grid's width), the pixel sizes may not be appropriate.
However, I found out that the Width property is a string, and will also accept ratios when setting the state. I'm persisting the per-grid column configuration in JSON, so this bit of code now takes care of creating the JSON document for me, changing the pixel widths per column by the respective percentage ratio:
public static string GetGridColumnStateJsonScaled<T>(TelerikGrid<T> grid)
{
var gridTotalWidth = grid.GetState().TableWidth;
var states = grid.GetState().ColumnStates;
if (gridTotalWidth.EndsWith("px"))
{
var gridWidthPx = decimal.Parse(gridTotalWidth, CultureInfo.InvariantCulture);
if (gridWidthPx != 0)
{
foreach (var state in states.Where(_ => _.Width.EndsWith("px")))
{
var colWidthpx = decimal.Parse(state.Width, CultureInfo.InvariantCulture);
var ratio = Math.Round(colWidthpx * 100 / gridWidthPx, 3);
state.Width = ratio.ToString(CultureInfo.InvariantCulture) + "%";
}
}
}
var json = JsonSerializer.Serialize<ICollection<GridColumnState>>(states);
return json;
}
The code presumes that the grid width (drawn from the grid's current state) is pixels - usually that should be the case. Also, it will only recalculate columns whose width is also specified with a "px" unit. It will overwrite the original width value inside the state.
This needs to be used whenever a state is about to be persisted as column sizes will be all pixels again as soon as the user modifies anything that affects the state.
While this does work, there might be a more elegant solution that I missed. In case there is not, feel free to use the code above :)
Cheers,
Joe

Hi all,
I've been observing a strange behavior and cannot seem to find out what causes it. This is primarily to collect some general ideas and learn about principles that I may have missed. I hate to say it but the fact I'm posting it here already suggests that Telerik Blazor UI might be involved, even if it is only by me using it wrong. Before I switched (from Bootstrap UI) to Telerik's Blazor UI, the solution operated more swiftly but was optically inconsistent if not outright ugly. Using Telerik Blazor UI introduced the desired consistency and working with the components is mostly a breeze. I don't regret my choice at all, and will do whatever is needed to keep it part of the solution.
For more context: this is about a multi-layered Blazor app (ASP.NET Core 8) using Telerik's Blazor UI to give users CRUD operations on medical case data. It is supposed to show data from an Oracle relational database with Entity Framework (EF Core 8). It's a data-first approach so I have built entity classes representing each table (about 30 tables in total now) and configured their relations mostly manually. But that's not actually the point. It's just to describe why I can't just paste a small code snippet here. It's a medical application so I'm legally unable to paste code 1:1 from my solution, and it's tons of code by now. Hope the description I'm giving below is enough to put you in the frame.
There are multiple Razor pages and components, some with more and some with less complexity:
The editor page (the heaviest piece of the solution) features:
All pages use InteractiveServer render mode as that is what I found works best for me. Until now, the software is only running on my dev machine in Visual Studio 2022, and most of the time in debug mode.
IMPORTANT: Let me emphasize that what I am describing here appears exclusively in debug mode as long as VS2022 is attached, and not when the solution is run by dotnet run. It's a p.i.t.a. though to debug with the handbrake engaged, and I'm not sure if the process does not hide a problem even when it runs without a debugger attached. It's just much faster then but that's not proof that whatever issue it is only affects the debug scenario.
The problems begin when I start navigating between the pages. Sometimes it's really fast, sometimes the same thing takes a lot of time. In my perception it might be related to how quickly I navigate but the actual trigger for the behavior is mostly unclear at this time. Heavier pages cause longer delays (and more exceptions along the way), while being loaded as well as while navigating away from them. But it's not consistent enough to point to an overall page or DOM size-related issue.
What struck me is that the debug console gets flooded with errors like these as delays are happening:
Exception thrown: 'Microsoft.JSInterop.JSDisconnectedException' in Microsoft.JSInterop.dll
Exception thrown: 'Microsoft.JSInterop.JSDisconnectedException' in System.Private.CoreLib.dll
Exception thrown: 'Microsoft.JSInterop.JSDisconnectedException' in System.Private.CoreLib.dll
Exception thrown: 'Microsoft.JSInterop.JSDisconnectedException' in Microsoft.AspNetCore.Components.Server.dll
The one from System.Private.CoreLib.dll appears twice most of the time, sometimes only once. A block like this is shown repeatedly up to 90 times in quick succession, in worse cases, sometimes only ten of these blocks appear in the console. But it's always this combination of the same three DLLs being addressed. When this happens, no other exceptions mix in, it's a constant stream of these three / four exceptions. The application is massively slowed down as this happens. Not as much as showing me a waiting indicator and reconnecting in the page though.
What's also interesting is that the user-end of the solution, besides being very slow at times, behaves fully normally. There are no errors or exceptions apparent to the user. To me this looks like the exceptions are silently consumed somewhere without giving further detail. Each occurrence takes some processing time. I can't say where the exceptions are thrown - probably somewhere deep inside the JS layers - but it's really unsettling and I have some doubts about moving this to production unless this is clarified a bit better.
The Edge browser's developer tools show nothing unusual. The JavaScript console there stays error-free, and running a network recording during a page refresh does show that loading takes very long (about 5 out of 10 seconds are spent with no traffic at all), but all HTTP operations have status 101 (switching protocols) or 200 (success). No error indication at all there.
I beg your pardon for being too unspecific where it may count but this is honestly my first Blazor application at all, and it's a monster of a project right away. I'm overwhelmed by the time pressure already and there's no team mates to help out. Random delays are the last thing I need.
So to wrap this up, what I'm looking for is basically guidance like:
Thank you all for reading, and in advance for any clues.
Cheers, have a nice day!
Joe

Is it possible to change the headings in the column chooser menu?
This is supported in other Telerik products by using the Messages property which is absent in Blazor
Hi,
I've created a Telerik Blazor grid like the one in the Repl: https://blazorrepl.telerik.com/mpONGnvz356DEAKK31
There I use dynamic columns combined with a nullable dictionary. Everything works fine.
But when I group by the bool column the Count in the group header gets mixed up.
Does anybody have an idea how to fix that?
Best regards,
Rayko
How can i add a data-testid to a GridCommandColumn?
I am trying to add a static id to a GridCommandColumn, but am not having any luck. For GridColumns I am able to add a HeaderTemplate and add a data-testid that way
Is there a way to add a data-testid to a GridCommandColumn component?


Hi guys,
I have a grid with inline editing and I want to add some custom validation, as you can check below.
<TelerikGrid Data="@Model.Equipments"
EditMode="GridEditMode.Inline"
OnUpdate="@OnUpdate"
OnCreate="@OnCreate"
OnDelete="@OnDelete">
<GridToolBarTemplate>
<GridCommandButton Command="Add">Add new equipment</GridCommandButton>
</GridToolBarTemplate>
<GridColumns>
<GridColumn Field="@nameof(Equipment.Code)"
Title="Code">
<EditorTemplate>
@{
Equipment item = (Equipment)context;
}
<div class="k-form-field-wrap">
<TelerikTextBox @bind-Value="item.Code" />
<TelerikValidationMessage For="@(() => item.Code)" />
</div>
</EditorTemplate>
</GridColumn>
<GridColumn Field="@nameof(Equipment.Name)"
Title="Name">
<EditorTemplate>
@{
Equipment item = (Equipment)context;
}
<div class="k-form-field-wrap">
<TelerikTextBox @bind-Value="item.Name" />
<TelerikValidationMessage For="@(() => item.Name)" />
</div>
</EditorTemplate>
</GridColumn>
<GridCommandColumn Width="185px">
<GridCommandButton Command="Edit">Edit</GridCommandButton>
<GridCommandButton Command="Delete">Delete</GridCommandButton>
<GridCommandButton Command="Save" ShowInEdit="true">Save</GridCommandButton>
<GridCommandButton Command="Cancel" ShowInEdit="true">Cancel</GridCommandButton>
</GridCommandColumn>
</GridColumns>
</TelerikGrid>
public sealed class Equipment
{
public Guid Id { get; set; }
[Required]
public string? Name { get; set; }
[Required]
public string? Code { get; set; }
}
If I don't fill in the Name or Code, I and I hit Save, I can see the validation message under the corresponding column in the row that is in edit mode. So far so good.
However, say that I want the code to be unique. How to I tackle this one? I would like to see a validation message under the Code textbox "That code already exists", or whatever the message might be.
Any guidance on the recommended approach here would be great—thanks!
Regards,
Bogdan
