Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 7th, 2006, 09:31 PM
Authorized User
 
Join Date: Jan 2006
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Default Adjust row height of gridview

How might I adjust the row height in gridview?
Thanks!
 
Old February 8th, 2006, 01:30 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Use the RowDataBound Event:
Not positive on the syntax

If e.Item.ItemType = ListItemType.Item Then
   e.Item.Height = Unit.Pixel(50) ''set the height as you want here
End If

 
Old February 8th, 2006, 05:38 PM
Authorized User
 
Join Date: Jan 2006
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your post. I'll keep that in mind. I also found I could use style="padding-top.(etc) in the Gridview declaration...but this might not be dynamic...
 
Old February 8th, 2006, 05:53 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Glad to help.

 
Old January 31st, 2008, 12:16 PM
Registered User
 
Join Date: Jan 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorry for bumping such an old topic, how would I do this in ASP.NET and C#? I have the book infront of me and I'm lost and my head hurts.

Government would be an insult to both God and man in which the citizens might say 'The state has given us all we posses; and we owe it nothing but prayers...' -'Treatise on Toleration'- Voltaire
 
Old February 1st, 2008, 07:01 AM
Registered User
 
Join Date: Jan 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Got it, thanks anyway!

Government would be an insult to both God and man in which the citizens might say 'The state has given us all we posses; and we owe it nothing but prayers...' -'Treatise on Toleration'- Voltaire





Similar Threads
Thread Thread Starter Forum Replies Last Post
GridView and Row Height problem snufse ASP.NET 2.0 Basics 4 January 11th, 2008 02:29 PM
Fixed table height and row height rajanikrishna HTML Code Clinic 3 January 18th, 2007 12:42 AM
Fit the row height dinamically in a datagrid Lukas C# 1 June 7th, 2006 03:06 AM
minimise a <div> (adjust height) crmpicco Javascript How-To 1 September 21st, 2005 01:39 AM
Row Height aspadda Excel VBA 0 February 25th, 2004 03:48 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.