We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Cannot widen from target type to primative type

G''day, I''m having the same issue as discussed in http://www.syncfusion.com/support/forums/message.aspx?MessageID=9987 I''m a little bit confused about the solution though. I have instances of a custom class added to an arraylist which is then bound to the grid control. When I try to edit the system.int32 fields, I get the "Cannot widen from target type to primative type" error. Can you please spell out to me how to get around this using the CurrentCellValidating event? Sorry if I''ve missed something simple, DS

2 Replies

AD Administrator Syncfusion Team April 6, 2004 01:13 AM UTC

In the thread you referenced, I think the error was caused by the type of the coulmn being set to Int32 in one place and double in another. Are you explicilty setting the CellValueType for this column? If not, then you might try setting it. Exactly where are you getting this error? What is the callstack when you get the error?

DS Damien Sawyer April 6, 2004 04:46 AM UTC

G''day, I explicitly set StyleInfo.CellValueType for each of the columns and the problem went away. Thanks again - You guys really do get 11 out 10 for support!! :-)

Live Chat Icon For mobile
Up arrow icon