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

Object of type ''System.String'' cannot be converted in type ''System.Double'' in GDBG

Thread ID:





46394 Jul 12,2006 09:01 AM Jul 26,2006 02:58 AM Windows Forms 2
Tags: GridControl
Asked On July 12, 2006 09:01 AM

Hi, i''m using a GridDataBoundGrid. When i want to create an item, i add a new row and show a button in the last column of the row, ans i allow the user only to modify that row. The datasource of the grid is a custom class that implements tne needed methods. My problem is that when i click the accept buttton, during the execution of grid_CellButtonClicked event (but it is not in the event''s code) a messagebox apperar saying "Object of type ''System.String'' cannot be converted in type ''System.Double''" although this error is not true (since i set the data source as readonly when the button is clicked and at the end of the event i set readonly to false, so the MessageBox appears but does not modify the datasource, i a can save the item to database). So... who can i prevent this message to appear? i have read this http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=26 but it does not fit my scenario. Thank you

Replied On July 13, 2006 03:03 AM

One more thing that i forgot yesterday, this only happens when i add the first item. When adding other items the message doesn''t appear. Before using the attribute ReadOnly in my custom datasource after the message appearing an one of the cells that had a value (string value that maps to a string field) was reset to blank.

Replied On July 26, 2006 02:58 AM

Any suggestion?


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.

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.