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.

cellvaluetype error

Thread ID:

Created:

Updated:

Platform:

Replies:

13646 May 5,2004 05:13 AM May 5,2004 07:29 AM Windows Forms 1
loading
Tags: GridControl
Mike Ralston
Asked On May 5, 2004 05:13 AM

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 07:29 AM

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

CONFIRMATION

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.

;