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

Editing the raw value of cell (no formatting)

Thread ID:





80076 Mar 11,2009 02:03 PM UTC Mar 12,2009 12:50 PM UTC WinForms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On March 11, 2009 02:03 PM UTC

Is there any way to force the grid to display the raw, non-formatted value of a cell when a user starts editing it?

E.g. if a cell's value is 5000000 and after formatting it gets displayed as 5,000.00 then I would like to edit the original value instead of the formatted one.


Rajadurai C [Syncfusion]
Replied On March 12, 2009 12:50 PM UTC

Hi John,

Thanks for your interest in Syncfusion products.

Please try handling the CurrentCellActivated and CurrentCellDeactivated events with the following code.

void gridControl1_CurrentCellDeactivated(object sender, GridCurrentCellDeactivatedEventArgs e)
GridCurrentCell cc = this.gridControl1.CurrentCell;
this.gridControl1[cc.RowIndex, cc.ColIndex].Format = "##.00";

void gridControl1_CurrentCellActivated(object sender, EventArgs e)
GridCurrentCell cc = this.gridControl1.CurrentCell;
this.gridControl1[cc.RowIndex, cc.ColIndex].Format = "##";

The required functionality can be achieved by this code.



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