asp.net|datagrid| page ASP. NET page, sometimes we need to freeze a column in the DataGrid, for example, when the number of data items is too large, we need to make the first column not move, drag the horizontal scroll bar when the other columns are hidden, you need to freeze the column, and sometimes also need to let the DataGrid's head does not move, drag the vertical scroll bar, The following data items can be scrolled. In the implementation of the process, is actually using a CSS style to control, together look.
To freeze which column, add Fixcol this CSS to Headerstyle-cssclass and itemstyle-cssclass-->
<asp:boundcolumn datafield= "LastName" headertext= "name" >
!--below is the frozen column-->
<itemstyle cssclass= "Fixcol" > </ItemStyle>
</asp:BoundColumn>
Add Fixtitle This CSS to the Headerstyle-cssclass and itemstyle-cssclass--> of the DataGrid.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service