GridView Header Freeze Using CSS

Freezing the columns in excel is a amazing utility, when performing on broader distribute sheets. When you will need to examine values across the columns, freezing will be quite handy. Freezing header will generally be valuable if you are functioning in a massive information established

GridView is a very best control to show a spreadsheet / tabular information. But unfortunately there is no indigenous aid for this freezing functionality. To make items worse, there is no developed in support for even GridView scrolling. We need to have to produce our own Cascading Design Sheets to manage this.

So there is a have to have of solutions. I would like to share how this can be realized with Designs and CSS with the assistance of ASP.internet Before looking through additional, I would like to highlight some specifics about the systems I am likely to use to get this completed in ASP.Net. This is doing work dependent on client settings mainly, so there is no warranty that it will do the job on all target platforms.

On top of that, due to the fact it is consumer centric, the Document Sort will impact the operation tremendously. Selecting an inappropriate information variety will bring about the GridView columns not to be frozen. Transforming document style to rigid will direct to unwanted consequences. So hold it Transactional generally and it worked to me often.

Given that there is no created in assistance for scrolling, we require to do itusing CSS. Scrolling can be enabled employing the next

1) Incorporate a container to the GridView. With this we can get scrolling to the GridView
2) to help scrolling in this div. Add a design and style attribute “overflow”

Freeze GridView Header

To freeze header, include a model “posture: relative” to header row. Following this the complete header row will be frozen. The header row will not transfer when scrolling vertically up and down. When scrolling horizontally (e.g. remaining to ideal), the column header have to move horizontally if the necessary width is a lot more than obtainable width.

Read far more in this article GridView header freeze. Scroll ahead of freeze

Leave a Reply

Your email address will not be published.