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.

Storing and Retriving the Formatted text from the Cell

Thread ID:

Created:

Updated:

Platform:

Replies:

10912 Feb 16,2004 09:41 PM Feb 17,2004 06:38 AM Windows Forms 3
loading
Tags: GridControl
Satish
Asked On February 16, 2004 09:41 PM

Hi, I want to know how to Store and Retrieve the Formatted text using Dataset into the database from the Cell. Sample application would be appreciated. Thanks Satish

Administrator [Syncfusion]
Replied On February 17, 2004 02:22 AM

I think in order to do this, then all your DataColumns can only be of datatype string. The reason is that FormattedText is a string. If your Datatable expects some other type, like a double, then it throws an exception when you try to store a string there. So, do all the columns you want to save a formatted text have type string? If so, then exactly how are you using the grid to format them? Normally, in order for style.Format to have an effect, the style.CellValueType has to be set to something like double. The normal behavior is to receive something like a double from the database, let the grid format it using style.Format, and then any changed values go back to the database as a double. If you will explain exactly what you are trying to do, then maybe we can suggest something.

Satish
Replied On February 17, 2004 05:02 AM

Please find the attachment. Do let me know its possible. Thanks Satish >I think in order to do this, then all your DataColumns can only be of datatype string. The reason is that FormattedText is a string. If your Datatable expects some other type, like a double, then it throws an exception when you try to store a string there. > >So, do all the columns you want to save a formatted text have type string? If so, then exactly how are you using the grid to format them? Normally, in order for style.Format to have an effect, the style.CellValueType has to be set to something like double. The normal behavior is to receive something like a double from the database, let the grid format it using style.Format, and then any changed values go back to the database as a double. > >If you will explain exactly what you are trying to do, then maybe we can suggest something. problem-grid_3235.zip

Administrator [Syncfusion]
Replied On February 17, 2004 06:38 AM

??? Let you what is possible? I do not understand. When you say datagrid, I assume you mean GridDataBoundGrid. Is that correct? If so, take a look at the DataBoudGrid Designer Tutorial in the Grid Users Guide which you can see in the Developer Center. It steps you through using a DataSet/DataAdapter through the designer.

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.

;