Automatic dimension string in datagrid view

hai sir how to increase row height in datagridview automatically when text (character) needs to be wrapped in the same row. Then the line height should automatically increase. eg

---------- this is column width
column1

----------
abcdefghijklmn
----------

      

here "klmn" comes next line. But we manually increase the height of the line that will be displayed. but I want to automatically increase the row height. what am i doing sir

+1


a source to share


3 answers


There is a property AutoSizeRowsMode

. Set it to AllCells

or DisplayedCells

. AllCells

it will take time if the datagridview has a very large number of rows. DisplayedCells

will resize the displayed cells only.



+3


a source


dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;

      



+1


a source


height or width? - overflow is normal in this case: hidden; and ... or show the full line in a tooltip, or when the user mouse hovers over the line, it will start executing (horizontal scrolling) so that the text is fully readable.

Is this what you are looking for?

0


a source







All Articles