DataGrid CellRender with custom CssClass after v.4.21.0

After the updating to >= v.4.21.0 i noticed that my current solution to add background classes to my cells stopped working. I noticed in the updated the code, that adding custom attributes seems to be adding a ";" (semi-colon). This seems to interupt with my current code.

I also noticed in your example code for cell render, that it works like this (and it only uses "style" as adding custom attribute).

I have found a workaround for my given case, where i put whitespace both at the start and at the end of my class which i wish to add as an custom attribute.

I also noticed that everything gets added twice (probably because of pre-render), so is it possible to get "args.FirstRender" on "DataGridCellRenderEventArgs" as well? (it is currently present in "GroupRowRenderEventArgs").

If everything works as intended, ill just have to adapt to only using style instead i think.


This is definitely not OK. We will publish fix immediately!

1 Like

Just published update (4.21.2) with this fixed.

1 Like

Hi @enchev , I'm currently using Radzen Studio 2.87.2 with your components version 4.21.4.

I'm having the same or at least am similar issue here (looks like it is not fixed yet or a regression!):

In the columns definition of the grid, I have assigned the CSS class "fw-bold" to one column which makes this column appear in bold.

Then I use CellRender event to assign a special custom class to certain rows, where a given criteria matches:

args.Attributes.Add("class", "table-bg-red");

The result is, that in rows, where the "table-bg-red" class is applied, the "fw-bold" class is ignored. The cause is that the class="" arribute in the HTML code got corrupted:

<td class="table-bg-red;fw-bold table-bg-red">

However, it should look like this:

<td class="table-bg-red;fw-bold">

Can you confirm this? Thanks!

Hi @JustJoe,

Issue confirmed and fix released immediately (4.23.7)!