This MSDN article suggests it is possible to change the content for an auto generated data grid view with your own data and re-bind one of its columns, changing the type. It does not describe exactly how to proceed though. There are a number of questions similar to this one, but most of them essentially point towards MSDN sources and have no real pointers how to exactly proceed. Most importantly it's fairly unclear what properties to set in your custom column to make sure it works the same way an automatically generated column would. This question details a similar problem, but the example isn't very minimal at all.
Let's assume we have the following things (as a minimum example):
- A Database Table containing some N columns. One of these columns contains 3 different values. Let's say it's an integer column that can contain 0, 1, or 2.
- A
DataGridView
that has been bound to said Database Table as a Data Source.
By itself, VB.NET would generate a textbox
column. As this isn't very user-friendly, I'd like to replace it with let's say a DataGridComboBoxColumn. How would one go about doing this?