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. Image for the cookie policy date

Nullable Decimal in GGC

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.

3 Replies

RC Rajadurai C Syncfusion Team October 7, 2009 12:54 PM UTC

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


MK Michael Keller October 7, 2009 03:22 PM UTC

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"?


RC Rajadurai C Syncfusion Team October 12, 2009 12:30 PM UTC

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

Loader.
Live Chat Icon For mobile
Up arrow icon