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?