How to Auto-size cell in datagridview according to data size

Total Post:89

Points:629

C# 
C#
 1828  View(s)
Ratings:
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?

  1. Re: How to Auto-size cell in datagridview according to data size

    Hi Takeshi,

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

    dataGridView1.DefaultCellStyle.WrapMode = DataGridViewTriState.True;

Answer

Please check, If you want to make this post sponsored

You are not a Sponsored Member. Click Here to Subscribe the Membership.