I have posted a function to auto-fit the columns in a ListView before. However, when I wanted to do the same thing for a DataGridView, the task is a little different (yet easier):
DataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells
3 comments:
thanks, man.
Thanks. Easy and simple.
Just what I was looking for. Thanks!
Post a Comment