Overblog Follow this blog
Edit post Administration Create my blog
Balavardhan Reddy Narani

Set Vertically and Horizontally Scollbars for Data Grid or Gridbiew in Asp.net

March 7 2009 , Written by Balavardhan Published on #ASP.Net

Vertically and Horizontally Scollbars for Data Grid or Gridbiew in Asp.net
Here by I am providing a easiest way to set scroll bars to Data Grid. in C#
Take a Data Grid or Grid View(Dotnet 2.0) and keep that control under a DIV tag of HTML tag and Provide CSS Properties


<Div style="width:600px; height:300px;CLEAR: both;BORDER-RIGHT: #9da0ba 1px solid;BORDER-TOP: #a9b5da 1px solid;SCROLLBAR-FACE-COLOR: #dde1ed;MARGIN: 5px 0px 8px;SCROLLBAR-HIGHLIGHT-COLOR: #ffffff; OVERFLOW: auto;BORDER-LEFT: #a9b5da 1px solid;SCROLLBAR-SHADOW-COLOR: #73779d; SCROLLBAR-3DLIGHT-COLOR: #96a2c8;SCROLLBAR-ARROW-COLOR: #73779d;SCROLLBAR-TRACK-COLOR: #ebeaf2; BORDER-BOTTOM: #9da0ba 1px solid;SCROLLBAR-DARKSHADOW-COLOR: #faf6f2;SCROLLBAR-BASE-COLOR: #c0ced9; POSITION: relative">
 <asp:GridView >
-- your Grid view controls
 </asp:GridView>
</Div>

by the above settings for 'DIV' tag automatically appears scrollbars to Grid View or Data Grid which you kept i 'DIV' tag

Share this post

Repost 0

Comment on this post