How can I get a column in a DataGridView to autosize to the contents of a Combobox?
<p>I have a column in a DataGridView with the column type <a href="https://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcomboboxcolumn(v=vs.110).aspx" rel="nofollow noreferrer">DataGridViewComboBoxColumn </a>. In this combo box, I have several strings of varying length.  Some of these strings can be changed by the users in the application settings.  It looks something like this:</p>

<p><a href="https://i.stack.imgur.com/XiMNv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XiMNv.png" alt="screenshot of column"></a></p>

<p>The column AutoSize options, such as AllCells, work nicely with DataGridViewTextBoxColumns.  But they don't work as expected with combo boxes.</p>

<p>How can I set the width of this column to fit the contents of a combo box?</p>