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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Cannot widen from target type to primative type

Thread ID:





12629 Apr 5,2004 10:56 PM UTC Apr 6,2004 04:46 AM UTC WinForms 2
Tags: GridControl
Damien Sawyer
Asked On April 5, 2004 10:56 PM UTC

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

Administrator [Syncfusion]
Replied On 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?

Damien Sawyer
Replied On 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!! :-)


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon