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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Changing cell value erases formatting

Thread ID:





68890 Oct 4,2007 02:46 PM UTC Oct 4,2007 03:43 PM UTC WinForms 1
Tags: GridControl
Asked On October 4, 2007 02:46 PM UTC


I try to programatically change the value of a cell, but after I do so the new cell value is not formatted as per the format property.

Initially, I set gridstyleinfo format, and gridstyleinfo cell value which gets formatted appropriately. But then on button click, I change gridstylinfo cellvalue, but the new value is not formatted. I have attached a sample.

Thanks for your help.


haneefm [Syncfusion]
Replied On October 4, 2007 03:43 PM UTC

Hi Adam,

You can try setting the CellValueType property to "System.Double" andalso call the ApplyFormattedText method in a button.Click event to apply the format of the gridcell. Below are the codes that shows this task.

'LoadGrid method
gsi.CellValueType = Type.GetType("System.Double")

'Buttton.click event handlerCode
Grid.Model.Item(1, 1).CellValue = "9998.5369"
Grid.Model.Item(1, 1).ApplyFormattedText(Grid.Model.Item(1, 1).Text)

Best regards,


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