HeaderHtmlAttributes() function no longer works

1 Answer 453 Views
Grid
Jose
Top achievements
Rank 1
Jose asked on 26 Apr 2022, 06:31 AM

Hello, in the columns grid, the HeaderHtmlAttributes() function no longer works.

It no longer works if you put a style. example. HeaderHtmlAttributes(new { style = "text-align: center" }).

The demo does not work
https://demos.telerik.com/aspnet-core/grid/cell-alignment

Thanks,

   Jose


Jose
Top achievements
Rank 1
commented on 26 Apr 2022, 06:55 AM

The problem may be this

.k-grid .k-cell-inner {
    display: flex;

.......

If I override the class by this then it works

.k-grid .k-cell-inner {
    display: inline-flex;

}

 

 

1 Answer, 1 is accepted

Sort by
0
Mihaela
Telerik team
answered on 29 Apr 2022, 12:39 AM

Hi Jose,

Thank you for your feedback.

I confirm that this is a bug , and it is already logged in the kendo-ui-core repo, and it is currently in progress. You can follow the status here:

https://github.com/telerik/kendo-ui-core/issues/6755

While the official fix is provided, I would recommend the aligning the column headers as per the example below:

<style>
  #grid .k-grid-header .k-link { /* "grid" is the Name() of the Grid */
      justify-content: center; 
  }
</style>

Here is a REPL example for your reference: 

https://netcorerepl.telerik.com/GmadFJbu27QxPrnE34

 

Regards, Mihaela Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid
Asked by
Jose
Top achievements
Rank 1
Answers by
Mihaela
Telerik team
Share this question
or