<p>I would like to add a DataGridViewTextBoxCell cell to a DataGridViewCell control, but as well as being able to type in the text cell as normal it must also contain a '...' button that once clicks brings up the OpenFileDialog window to allow the user to select a file. Once selected, the text cell will be populated with the full file path.</p>

<p>What is the best way to go about this?</p>

<p>Thanks</p>

[{'answer_id': 63228, 'author': 'Cameron MacFarland', 'author_id': 3820, 'author_profile': 'https://Stackoverflow.com/users/3820', 'pm_score': 2, 'selected': True, 'text': '<p><a href="http://msdn.microsoft.com/en-au/library/7tas5c80.aspx" rel="nofollow noreferrer">This</a> MSDN article explains how to add a custom control to a <code>DataGridView</code>.</p>\n\n<p>You should be able to make a <code>UserControl</code> that has a textbox and button on it and embed that in the <code>DataGridView</code>.</p>\n'}, {'answer_id': 63243, 'author': 'Phil Wright', 'author_id': 6276, 'author_profile': 'https://Stackoverflow.com/users/6276', 'pm_score': 0, 'selected': False, 'text': '<p>You will need to create your own column and cell classes in order to do this. I would suggest using <strong>.NET</strong> Reflector to look at the implementation details of the DataGridViewTextBox as a starting point and then customizing to add display of a button at the end of it. Check out these tutorials to get started...</p>\n\n<p><a href="http://msdn.microsoft.com/en-us/library/aa730882(VS.80).aspx" rel="nofollow noreferrer">MSDN Article</a></p>\n\n<p><a href="http://msdn.microsoft.com/en-us/library/ms180996.aspx" rel="nofollow noreferrer">MSDN Reference</a></p>\n'}]
['https://Stackoverflow.com/questions/63130', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/7585/']