Is there any way to freeze column headers for ASP.net MVC Razor(.cshtml) when scrolling? I am not using a separate gridview library, at least not currently. I can use .cshtml, or alternatively (if needed) javascript or jquery.
One of our managers asked me this, and it is (IMHO) a good question.
Any help would be appreciated.
I don't have any freeze code attempted myself, however, per request, here is what the razor code looks like in Index.cshtml:
<th class="headerStyle">
@Html.DisplayNameFor(model => model.First().myColumn_1)
</th>
and later:
<td class="boxed_displayElementStyle">
@Html.DisplayFor(modelItem => item.myColumn_1)
</td>
I do want to allow the columns to have variable widths and variable header width (though each column having the same width as its header) so this complicates freezing the headers very greatly.
Thanks in advance!