[Mono-winforms-list] DataGridView: System.InvalidCastException, Value is not a convertible object

m0n0 ole at monochrom.net
Tue Jul 28 16:20:29 EDT 2009




Stifu wrote:
> 
> Is this with Mono 2.4.x?
> If so, it'd be nice if you could create a reduced test case and file a bug
> report.
> 

No this isn't with v. 2.4... it's about mono 1.9 (dunno how to get an .deb
file for mono 2.4 from mono page... and my distr. ain't got a newer version
in the apt repositories.... 

So maybe that would solve the problem, but I worked around it, too. 

I implemented the Interface IConvertible and programmed the ConvertToString
Function...  Then that worked. But I'm not understanding why mono isn't
calling to string on the object to convert it to a string...

I'm not going to offer a test case, firstly because it isn't known if it's
also happening in 2.4... But the the problem appeared with an Datagrid that
contains a "DataGridViewComboBoxCell" or something like that ^^

each item in the combobox has it's string value assigned  AND also it's
tag... the tag is a custom object, the one that mono complaint's about in
the exception.

 




-- 
View this message in context: http://www.nabble.com/DataGridView%3A-System.InvalidCastException%2C-Value-is-not-a-convertible-object-tp24639939p24707144.html
Sent from the Mono - WinForms mailing list archive at Nabble.com.



More information about the Mono-winforms-list mailing list