Home > DeveloperSection > Forums > How to Auto-size cell in datagridview according to data size
Takeshi Okada
Takeshi Okada

Total Post:89

Posted on    February-09-2014 11:23 PM

 C# C# 

 1 Reply(s)
 1111  View(s)
Rate this:

I searched for Autosizing of cell but found Auto-size row and column how can I make particular cell autosize (in terms of height since column width will be fixed)according to data size of that particular cell? can it be done using some property of datagridview?

Pravesh Singh

Total Post:411

Posted on    February-09-2014 11:47 PM

Hi Takeshi,

This line of code make Cell Auto-size Vertically depending on the data loaded

dataGridView1.DefaultCellStyle.WrapMode = DataGridViewTriState.True;

Don't want to miss updates? Please click the below button!

Follow MindStick