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

Cell value format ..

Thread ID:





50554 Oct 13,2006 06:36 PM UTC Oct 16,2006 05:31 AM UTC WinForms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On October 13, 2006 06:36 PM UTC


i am trying something pretty basic. i want to set the value of a cell to be null when the value is 0.0. Its of type double. Setting it to DBNull.Value is causing GDBG to not behave.

what is the proper null value for a cell?


Administrator [Syncfusion]
Replied On October 16, 2006 05:31 AM UTC

Hi LI,

You can handle the DrawCellDisplayText event of the grid and set the e.DisplayText to some new value to want to display. Use the e.Style.CellIdentity.RowIndex and e.Style.CellIdentity.ColIndex to get the row and column of the cell for which the displaytext has to be set. Below is a code snippet.

private void gridDrawCellDisplayText(object sender, GridDrawCellDisplayTextEventArgs e)
if( e.DisplayText == "00.00")
e.DisplayText = String.Empty;

Please refer to the below sample for more details.

Let me know if this works.
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

or the page will be automatically redirected to 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