.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

fixed size in datagrid in ASP .NET

Posted By: Shanthini     Posted Date: June 25, 2009    Points:2   Category :ASP.Net
Hi,

I am having 4 gridviews in a single page... The values for these gridview will come from a table using database. The gridview are being displayed in different sizes.

How can i make the size of all the datagrids fixed and if there are more columns, the datagrid size should not change, instead there can be a scrollbar.

Thanks,
Shanthini

Responses
Author: Praveen             
Posted Date: June 26, 2009     Points: 5   

Hi,
You can place GridView inside Div tag and set its style overflow:auto and specify its height
for eg


<div style="overflow:auto; height=500px">
<asp:GridView ID="GridView1" runat="server">
</asp:GridView>
</div>


Happy Coding!!!
Praveen



Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend