Click here to Skip to main content
15,666,844 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Can someone tell me how can i enable scroll bar of Gridview when i have more no. of column?
When i tried, my browser also shows scroll. Please help me.
my code is
<asp:panel id="Panel1" runat="server" scrollbars="Auto" height="300" width="99%" xmlns:asp="#unknown" />

thanks in advance
Updated 12-Jun-10 6:18am
Sandeep Mewara 12-Jun-10 12:19pm    
Since your question was sort of incomplete, it was difficult to tell what issue you had so link provided should help you out.

Have a look at this:
How To Create GridView With ScrollBars?[^]

Try this [^]if needed more.
Share this answer
Put your Gridview inside a panel having scrollbars="Auto" and fixed the header of gridview through styleSheet.css file code.
<style type="text/css">
protected void GridView1_RowDataBound(object sender,GridViewRowEventArgs e)
if (e.Row.RowType == DataControlRowType.DataRow)
if(e.Row.RowIndex == 0)

Go through this solution. This will help u more...
Share this answer
Above you have mentioned that your browser is also showing scrollbar..
jst try to decrease the width of the panel may be by 10% and then apply the auto scroll to panel...

i hope it may work....

Share this answer

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