Click here to Skip to main content
15,896,118 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello, How do I change the row height of my gridview so that it will be static?

I have for example 10 columns, and 2 of such columns contains data 140 words or more. How do I make the columns for example to 80px in height but still be able to see all my text in the 2 columns?

I have tried
C#
<asp:GridView ID="GridView1" rowstyle-height ="50px"


but it doesnt work.

Hope I will be able to solve this soon! Thanks! :)
Posted

Bad idea. The size of the cell should be defined by the content. You should better not use absolute sizes and define padding instead. In all cases, you simple define appropriate CSS properties of td and/or tr elements. How? Start here:
http://www.w3.org/TR/CSS2/box.html[^].

—SA
 
Share this answer
 
Comments
Member 11667493 11-May-15 2:23am    
Thanks! :)
Sergey Alexandrovich Kryukov 11-May-15 2:47am    
You are very welcome.
Good luck, call again.
—SA
 
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