GridView Row Height

Posted on 2009-05-07
Last Modified: 2012-05-06
I'm trying to set the row height for a databound GridView.  Can this not be done in design time?  My rows are 10 times as thick as they need to be.
Question by:NigelRocks
LVL 29

Accepted Solution

QPR earned 125 total points
ID: 24332842
apparently you can set the row height by using the databound event

Assisted Solution

mrcoolcoder earned 250 total points
ID: 24333013
I think what you want is this:

<asp:Gridview ..... >
       <RowStyle Height="20px" />

Author Comment

ID: 24338728
I've gone under "RowStyle" and "Height" and set the height to some miniscule amount.  In design time, it obviously affects the height of the rows.  However, in runtime the rows are still huge.  Neither of the above suggestions has worked.
LVL 22

Assisted Solution

prairiedog earned 125 total points
ID: 24339529
Sounds like there is a CSS file that causing the problem. Do you have a CSS file? Check your GirdView's CssClass property.

Assisted Solution

mrcoolcoder earned 250 total points
ID: 24339545
.. or any of the columns with a control with height properties set.

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Sum Column in GridView 3 43
Registering DLL 5 43
Why is some text in blue in Visual Studio? 6 23
free scanner TWAIN can be operated with a Web application 9 38
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now