Grid - Different column header after getOptions()/setOptions()

1 Answer 11 Views
General Discussions Grid
Stefan
Top achievements
Rank 1
Iron
Iron
Veteran
Stefan asked on 13 Jun 2022, 01:21 PM | edited on 15 Jun 2022, 08:12 AM

Hi,

we recently updated out project from Telerik 2019 to Telerik 2022.

Now our grids behave differently (without error) when we use getOptions() and setOptions() to keep the grids state; the column headers seem to change.

 

Here is a column header before we restore the state:

<th class="k-header" data-field="Prioritaet" data-index="6" data-title="Priorität" id="03b46289-2aba-487e-ba2e-e4aa67dae464" scope="col" data-role="columnsorter"><a class="k-link" href="/inoTerminal/Fremdpanzer/Read?fremdpanzerTable-sort=Prioritaet-asc">Priorität</a></th>

Here is a the same column header after we restore the state:

<th scope="col" role="columnheader" data-field="Prioritaet" rowspan="1" data-title="Priorität" data-index="6" headers="undefined" id="03b46289-2aba-487e-ba2e-e4aa67dae464" class="k-header" data-role="columnsorter"><span class="k-cell-inner"><span class="k-link"><span class="k-column-title">Priorität</span></span></span></th>

 

Visibly this produces these results:

Before: 

After: 

Otherwise the functionality seems to be the same.

 

We're using the MVC-Helpers to generate the grid...

 

Update: 

To clarify, the difference in visible style comes through the css we implemented for the headers:

.k-grid-header th.k-header > .k-link {
    font-weight: bold;
    color: #2fa4e7;
    height: auto;
}

After restoring the grid state the hierarchy of elements in the headers has changed. And because we use the direct child selector (>), the styles are not applied anymore. We solved this now by omitting the direct child selector.

 

So the issue is not a severe one, but I'm still curious if it is expected behaviour, that the header markup changes after getOptions/setOptions?

1 Answer, 1 is accepted

Sort by
0
Yanislav
Telerik team
answered on 16 Jun 2022, 11:58 AM

Hello Stefan,

Thank you for the information and details provided.

Upon further investigation, we confirmed that the behavior is a bug at our end. Here is the logged item:

https://feedback.telerik.com/aspnet-mvc/1569285-after-using-setoptions-the-html-structure-of-grids-column-header-is-different

Please subscribe to it, in order to be notified in a timely manner when there is any update. Here is also the GitHub issue:

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

We apologize for any inconvenience caused until the issue is resolved.

As a small token of gratitude for reporting this, I updated your Telerik points.


Regards,
Yanislav
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
General Discussions Grid
Asked by
Stefan
Top achievements
Rank 1
Iron
Iron
Veteran
Answers by
Yanislav
Telerik team
Share this question
or