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

cellvaluetype error

Thread ID:





13646 May 5,2004 09:13 AM UTC May 5,2004 11:29 AM UTC WinForms 1
Tags: GridControl
Mike Ralston
Asked On May 5, 2004 09:13 AM UTC

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!

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


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