C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Freezing GridView Column Headers


Posted Date: 22 Sep 2007    Resource Type: Articles    Category: Web Applications

Posted By: Kamal       Member Level: Gold
Rating:     Points: 13



For Freezing GridView Header column

Put GridView in Panel or Div Tag.

< asp:Panel ID="Panel1" runat="server" class="freez" style="height:300px; width:700px;" >

< asp:GridView ID="GridView1" runat="server" AllowPaging="False" AllowSorting="True"
AutoGenerateColumns="False" DataKeyNames="id" DataSourceID="SqlDataSource1" Width="700px" BorderWidth="0" >
< Columns >
< asp:BoundField DataField="id" HeaderText="ID" SortExpression="id" / >
< / Columns >

</asp:Panel>

Next create freez Css Class

Next, I created the container css style class as Mitch suggests ...

/* So the overflow scrolls */
.freez {overflow:auto;}

/* Keep the header cells positioned as we scroll */
.freez table th {position:relative;}

/* For alignment of the scroll bar */
.freez table tbody {overflow-x:hidden;}

But,Problem is that it work fine in IE but not in FireFox.




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Properties In User Controls - A Tip And Trick
Previous Resource: Jupload -- A review on elegant uploading
Return to Discussion Resource Index
Post New Resource
Category: Web Applications


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

efax

Contact Us    Privacy Policy    Terms Of Use