0

I have an empty datagridview that I programmed column headers for but need different width for the columns. Not sure how to do it. Below is a line of code that makes my datagridview table. Any input would be great

dt.columns.Add("Part Number", Type.GetType("System.String"))

Ron
  • 1
  • 1
  • Does this answer your question? [How to change column width in DataGridView?](https://stackoverflow.com/questions/11926534/how-to-change-column-width-in-datagridview) – JohnG Dec 19 '21 at 05:03
  • 1
    Each column in a `DataGridView` has a `Width` property along with a `AutoSizeMode` property. What exactly is eluding you? You state that… _I programmed column headers for but need different width for the columns.”_ … ? … where is this code? That would be the place to set the columns width. I suggest you peruse the SO [tour] section as it shows how SO works. The [ask] section may help. In addition, you may find the SO [Asking](https://stackoverflow.com/help/asking) section useful. – JohnG Dec 19 '21 at 05:10

0 Answers0