BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
Hi De,
Thanks for choosing Syncfusion Product.
Query |
Comments |
How can I create a nullable currency cell? After I set CurrencyEdit cell type, all cells are displayed as 0,00 $, except if I explicitly reset all cells to null. |
You can set the value as null by assigning the CellValue as null like in below code snippet.
this.grid.Model[1, 1].CellValue = null;
|
When I edit a currency cell I have found no way to set it to null. If I try to delete contents it just displays 0,00 instead of empty text. |
You can achieve this requirement by handling the CommitCellInfo event of grid and set the cellvalue as null when the value is zero. |
When editing a cell, how can I force up / down arrow keys to leave cell and move up or down instead of increasing / decreasing cell value? |
You can achieve this by handling the CurrentCellPreviewKeyDown event of GridControl. |
We have attached a sample based on the above requirement for your reference.
Please let us know if you have any other queries.
Regards,
Pannir.
Hi De,
We have analyzed your query and Please find the below response.
Regarding Query#1,
If you want to display the CurrencyEdit cell as empty or null, then you need to explicitly set the Cellvalue as null and also set UseNullOption as true like in the below code snippet.
Code Snippet[C#]:
this.grid.Model[1, 1].CellType = "CurrencyEdit"; this.grid.Model[1, 1].CurrencyEdit.UseNullOption = true; this.grid.Model[1, 1].CellValue = null; this.grid.Model[1, 1].CurrencyEdit.NullValue = null;
|
Regarding Query #2,
After deleting the value of that cell, the CellValue should be zero and not be empty or null. This is the default behavior of CurrencyEdit cell type.
Please let us know if you have any other queries.
Regards,
Pannir