|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Multi line grid row with .net compact framework 2.0Hi,
How can I adjust the row height in a grid with multiple lines in a row? Thank you Christian. Web Forms or Window Forms?
Robin S. ------------------- Show quoteHide quote "Christian Philippart" <Christian Philipp***@discussions.microsoft.com> wrote in message news:91A2E74E-6BEF-42D8-8A4F-11C9BB42EF61@microsoft.com... > Hi, > > How can I adjust the row height in a grid with multiple lines in a row? > > Thank you > > Christian. Windows Forms
Show quoteHide quote "RobinS" wrote: > Web Forms or Window Forms? > > Robin S. > ------------------- > "Christian Philippart" <Christian Philipp***@discussions.microsoft.com> > wrote in message news:91A2E74E-6BEF-42D8-8A4F-11C9BB42EF61@microsoft.com... > > Hi, > > > > How can I adjust the row height in a grid with multiple lines in a row? > > > > Thank you > > > > Christian. > > > This is from "Pro .Net 2.0 Windows Forms and Custom Controls in VB2005"
by Matthew MacDonald. You set the columns that you want to wrap. Then you set the column width. Then you use automatic row resizing to heighten the row to fit all the text. Here's an example that ensures you can always see the full description text. The Description column is set to use DataGridViewAutoSizeColumnMode.Fill, and the automatic row size adjusts the row height as necessary. Dim colDesc as DataGridViewColum = dataGridView1.Columns("Description") 'Give it as much width as possible colDesc.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill 'Wrap to fit the bounds of the column colDesc.DefaultCellStyle.WrapMode = DataGridViewTriState.True 'Use row autosizing to show all the text dataGridView1.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.DisplayedCells If you use AllCell instead of DisplayedCells, it will do all of the cells in the grid; this will result in more lethargic performance. I think you can also use DataGridView styles. If this doesn't work, repost and hopefully if I don't have time to research it, someone else will. Good luck. Robin S. Show quoteHide quote "Christian Philippart" <ChristianPhilipp***@discussions.microsoft.com> wrote in message news:038A75EC-DBEC-445A-937A-6C1DDD46DCB1@microsoft.com... > > Windows Forms > > "RobinS" wrote: > >> Web Forms or Window Forms? >> >> Robin S. >> ------------------- >> "Christian Philippart" <Christian Philipp***@discussions.microsoft.com> >> wrote in message >> news:91A2E74E-6BEF-42D8-8A4F-11C9BB42EF61@microsoft.com... >> > Hi, >> > >> > How can I adjust the row height in a grid with multiple lines in a row? >> > >> > Thank you >> > >> > Christian. >> >> >> Thank you Robin
Show quoteHide quote "RobinS" wrote: > This is from "Pro .Net 2.0 Windows Forms and Custom Controls in VB2005" > by Matthew MacDonald. > > You set the columns that you want to wrap. Then you set the column width. > Then you use automatic row resizing to heighten the row to fit all the text. > > Here's an example that ensures you can always see the full description text. > The Description column is set to use DataGridViewAutoSizeColumnMode.Fill, > and the automatic row size adjusts the row height as necessary. > > Dim colDesc as DataGridViewColum = dataGridView1.Columns("Description") > > 'Give it as much width as possible > colDesc.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill > > 'Wrap to fit the bounds of the column > colDesc.DefaultCellStyle.WrapMode = DataGridViewTriState.True > > 'Use row autosizing to show all the text > dataGridView1.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.DisplayedCells > > If you use AllCell instead of DisplayedCells, it will do all of the cells in > the grid; this > will result in more lethargic performance. > > I think you can also use DataGridView styles. If this doesn't work, repost > and > hopefully if I don't have time to research it, someone else will. > > Good luck. > Robin S. > > > "Christian Philippart" <ChristianPhilipp***@discussions.microsoft.com> wrote > in message news:038A75EC-DBEC-445A-937A-6C1DDD46DCB1@microsoft.com... > > > > Windows Forms > > > > "RobinS" wrote: > > > >> Web Forms or Window Forms? > >> > >> Robin S. > >> ------------------- > >> "Christian Philippart" <Christian Philipp***@discussions.microsoft.com> > >> wrote in message > >> news:91A2E74E-6BEF-42D8-8A4F-11C9BB42EF61@microsoft.com... > >> > Hi, > >> > > >> > How can I adjust the row height in a grid with multiple lines in a row? > >> > > >> > Thank you > >> > > >> > Christian. > >> > >> > >> > > >
naming conventions forced by VS.NET?
Attribute instantiation How to declare a sub class thread dead lock Passing multiple arguments to the client-side JavaScript function in AJAX Replace " character in string DataGridView1 (VS2005) Search string in textfile Name space referencing problem textbox.backgroundImage |
|||||||||||||||||||||||