.NET Tutorials, Forums, Interview Questions And Answers
HomeTutorialArticlesForumInterview QuestionCode SnippetsTechnology NewsFun Zone Poll Certification Search
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


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

fixed size in datagrid in ASP .NET

Posted By :Shanthini     Posted Date :25/06/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        Company URL:           
Posted Date: 26/06/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   Silverlight IIS JQuery
JavaScript/VBScript Biztalk WPF Patten/Practices WCF Others
www.DotNetSpark.com UnAnsweredAll

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