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.

Nullable Decimal in GGC

Thread ID:

Created:

Updated:

Platform:

Replies:

90488 Oct 5,2009 08:28 AM Oct 12,2009 08:30 AM Windows Forms 3
loading
Tags: Grouping
Michael Keller
Asked On October 5, 2009 08:28 AM

Hello,

I use a ggc with customer defined business objects. There are some columns that allow null values (defined as Nullable in the business object). By setting the NullString property of the GridCurrenyInfo these values are displayed correct in the grid.

When the user enters a value everything works fine, BUT how can the value be set to "null" by the user. When the users marks the content of the cell and presses the DEL key a zero comes up.

Rajadurai C [Syncfusion]
Replied On October 7, 2009 08:54 AM

Hi Michael,

Thanks for your interest in Syncfusion Products.

From your update, it seems you are setting the celltype of those Nullable defined columns as 'Currency'. With this celltype set, even when the cellvalue is deleted completely, '0' will be the cellvalue. When this celltype is not set, the delete key operation will mark the cellvalue as null by default.

Regards,
Rajadurai

Michael Keller
Replied On October 7, 2009 11:22 AM

Hello Rajadurai,

yes it is correct what you say. I use the celltype "Currency". because it is a price, but it is an optional price and the user should be able to "delete" this price. No price is different from a price of zero in this case.

Using "not the celltype Currency" is not the solution because it is a currency value and I need the features (e.g. currency symbol).

It is not possible to set a cell with the celltype Currency to "null"?

Rajadurai C [Syncfusion]
Replied On October 12, 2009 08:30 AM

Hi Michael,

Thanks for your update.

With 'CurrencyCell' celltype in gridgroupingcontrol, it is not possible to display empty cellvalue. If you would like to achieve this along with the currencycell feature, you can handle the TableControlDrawCellDisplayText event and TableControlCurrentCellKeyDown event in such a way giving functionality similar to CurrencyCell celltype. Here is a minimal sample for your reference in which this has been implemented.
http://files.syncfusion.com/support/samples/Grid.Windows/7.3.0.20/F90488.zip

Regards,
Rajadurai

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.

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.

;