Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
grid view contains 25 columns but there header and column width is not show properly.i want to set each column with same width also want to freeze 1st 3 column and header row of the gridview.

What I have tried:

for fixed header i am already used



$(document).ready(function () {
$('#<%=grv_Details.ClientID %>').Scrollable({

});
});
after that header is fixed but width of header and column is not in proper alignment..
Posted
Updated 30-Jul-20 0:42am

1 solution

Here, have a look at this CP Tip: Freeze Gridview Header Using JQuery[^]
 
Share this answer
 
Comments
Member 14670157 30-Jul-20 7:09am    
Thanks Sandeep, Header is fixed now but i also have to freeze 1st 3 column of grid view for that
position: fixed; already applied..but still not working.
how to set width of each column same??? ...ItemStyle-Width="30px" and HeaderStyle-Width="30px" not working...
Sandeep Mewara 30-Jul-20 7:21am    
The position: sticky property supports both sticking to the top (as I've seen it used the most) and to the side in modern versions of Chrome, Firefox, and Edge. This can be combined with a div that has the overflow: scroll property to give you a table with fixed headers that can be placed anywhere on your page:
Member 14670157 30-Jul-20 8:09am    
Grid view 1st 3 Columns still not freeze,plz suggest another way to freeze it.
Sandeep Mewara 30-Jul-20 8:52am    
Here, look here: https://jsfiddle.net/OlegKi/9zky1320/75/

Columns and rows frozen.

Done with CSS & jquery.

PS: Url picked from one of the previous responses to similar thread.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900