Click here to Skip to main content
12,689,349 members (30,153 online)
Rate this:
 
Please Sign up or sign in to vote.
hey ,

is it possible to set the cells of a DataGridView so if the content
of a cell is longer than a certain amount of chars ,
the cell will split the text into few lines as needed...

as for now i get cells with long lines and i didnt find any way
to adjust the cells as multiline cells , im sure there is a way of doing that.

what properties , methods would solve my problem?

thanks.

Posted 17-Sep-07 0:47am
Updated 17-Nov-16 2:04am
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Have you set the cells to wrap = true



  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

Public Sub Multi_LineGrid(ByRef List As DataGridView)
       List.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells
       List.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells
       List.DefaultCellStyle.WrapMode = DataGridViewTriState.True
   End Sub
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

SELECT tbl_persenel.name AS from_,tbl_persenel_1.name AS to_, tbl_Persen.nameP, tbl_rom = tbl_persenel.id INNER JOIN
           tbl_mian_crm ON tbl_detils_crm.id_crm = tbl_mian_crm.id ON tbl_project.id = tbl_mian_crm.id_project LEFT OUTER JOIN
          tbl_Persen ON tbl_mian_crm.user_id = tbl_Persen.id
  Permalink  
Comments
Richard Deeming 17-Nov-16 9:36am
   
This question was asked and answered over NINE YEARS AGO.

Your "solution" isn't even vaguely related to the question that was asked.
  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.170113.4 | Last Updated 17 Nov 2016
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100