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

cellvaluetype error

I have a columstyle cellvaluetype set to double, but I want to insert text into some of the cells in that column and it abends with a ''cant convert to type double'' error. How can I get around that error. thanks!

1 Reply

AD Administrator Syncfusion Team May 5, 2004 11:29 AM UTC

If you are using a GridControl, you can set teh CellValueType on a cell by cell basis. If you are using a GridDataBoundGrid, what do you want the grid to do when it trys to save this string back into your DataSource which expects a double? Your DataSource is likely to have a problem. Do you want to sabe a DBNull back to the datasource? When you have the answer to the above question, then you can probably handle QueryCellInfo and SaveCellInfo to do what you need. If you are not pushing this string back to the DataSource, then in SaveCellInfo, you woul dhave to cache it locally. Then in QueryCellInfo, when this special cell is requested, you would provide it (instead of the grid getting some double from the datasource.) Here is a little sample that expects ints in column 2, but will allow you to enter strings there as well. WindowsApplication11-1_1960.zip

Loader.
Live Chat Icon For mobile
Up arrow icon