I have a column defined in my gridview. It's name is "Energy".
I use the following code to bind my object to it. The object is a generic List<> of other objects.
((
GridViewComboBoxColumn)m_grd.Columns["Energy"]).DataSource = m_snc.Configuration.CurrentRadiationDevice.Energies;
The binding seems to work fine as far as display is concerned. Each "Energy" object has a ToString() override which allows me to see what I want in cases where I bind it to drop down's (like in this case). The combo box is filled with the appropriate display values; however when I select an item from the combo box and check to see the value's type, it is always a System.String instead of the object type of the item that is selected. In this case the expected behavior of the following method would be my custom object's type instead of System.String.
row.Cells["Energy"].Value.GetType()