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.
Syncfusion Feedback

Cell value format ..

Thread ID:

Created:

Updated:

Platform:

Replies:

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

hi:

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?

thanks.

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.
http://www.syncfusion.com/Support/user/uploads/GDBGNullValue_e39f0d3f.zip

Let me know if this works.
Best Regards,
Haneef

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.

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

;