Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

VB.net RowHeight and Word Wrap

Posted on 2012-04-09
4
Medium Priority
?
1,588 Views
Last Modified: 2012-04-14
Hi

How do I set this for all sells in a DataGridView row. I need to make sure that if I have long text in a cell that it wraps and is all visible
0
Comment
Question by:Murray Brown
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 17

Accepted Solution

by:
nepaluz earned 2000 total points
ID: 37827942
1. For wordwrap, you use the wrapmode of the cellstyle, e.g for the entire grid use:
Me.dataGridView1.DefaultCellStyle.WrapMode = DataGridViewTriState.True

Open in new window

or you can apply the cellstyle to individual collections of cells, columns, rows etc
Here's a good resource from MSDN on datagridview formating http://msdn.microsoft.com/en-us/library/f9x2790s.aspx
2. For RowHeight, simple call set the height by
Dim row As DataGridViewRow = DataGridView1.Rows(0)
row.Height = 15

Open in new window

0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 37833050
I am being evil BuggyCoder

Your first link is for ASP.NET gridview (question is for winforms datagridview)
Your second link is for RadGrid which is a 3rd party control

:-)
0
 

Author Closing Comment

by:Murray Brown
ID: 37846087
Thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

636 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