|
<sfgrid:SfDataGrid.Columns>
<sfgrid:GridNumericColumn MappingName="OrderID" HeaderText="Order ID" AllowNullValue="True"/>
</sfgrid:SfDataGrid.Columns> |
hi Divakar,
I'm having difficulties in "entering a null" into a GridNumericColumn.
If i press delete, after pressing enter the value becomes 0!.
Basically my problem is how to enter NaN (not a number) or infinity.
I can display ∞ as shown in example:
But, i can only achieve during initialization. Once the user change into a number, I don't know how to change back to infinity. My idea is to enter NULL. But I don't know what to press to enter null.
I have tried:
backspace, delete, th
Hi CraftIndo,
It is clear that after pressing the delete key and then pressing the enter key,
the value becomes 0. Please note that you need to set the following in your
sample to overcome this issue. First and foremost, the numeric column property
defined in the model class needs to be a nullable type. Secondly, you can set
the AllowNullValue="True" in the GridNumericColumn. We have
shared a simple sample and demo video for your reference.
Code snippet:
|
<syncfusion:GridNumericColumn MappingName="OrderID" HeaderText="Order ID" NullText="∞" AllowNullValue="True" /> |
Please note that if you set NullText in the GridNumericColumn, it will be applied after the enter key is pressed following a deletion. Otherwise, it will remain blank.
Regards,
Sethupathy D.