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

Storing and Retriving the Formatted text from the Cell

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

3 Replies

AD Administrator Syncfusion Team February 17, 2004 07:22 AM UTC

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.


SA Satish February 17, 2004 10:02 AM UTC

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


AD Administrator Syncfusion Team February 17, 2004 11:38 AM UTC

??? 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.

Loader.
Live Chat Icon For mobile
Up arrow icon