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

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

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

2 Replies

BO Borja July 13, 2006 07:03 AM UTC

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.


BO Borja July 26, 2006 06:58 AM UTC

Any suggestion?

Loader.
Live Chat Icon For mobile
Up arrow icon