Freeze the title, scroll through the GridView

How to freeze a gridview asp.net header? I try to do it differently, but not capable.

I am using ASP 2.0 and VS 2010.

Can anyone help me?

+7
source share
1 answer

I am using jquery floatThead

http://mkoryak.imtqy.com/floatThead/#intro

I had to use a bit of jquery to convert the first line to thead to make it work.

example below:

$(document).ready(function () { var $theadCols = $("#ContentPlaceHolder1_grdCashflow tr:first-child"), $table = $("#ContentPlaceHolder1_grdCashflow"); // create thead and append <th> columns $table.prepend("<thead/>"); $table.find("thead").append($theadCols); // init stickyHeader $table.floatThead(); //$table = $("#ContentPlaceHolder1_grdCashflow"); $table.dataTable( { "paging": false, "ordering": false, "dom":'<"top"fi>rt<"bottom"><"clear">' } ); }); 
0
source

Source: https://habr.com/ru/post/910414/


All Articles