The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi:
when user edits a cell bound to double type in databound grid, If the user leaves the cell empty before exiting the cell, a popup message
"Cannot widen from target type to primitive type" is generated.
We would like to change this behavior, instead of a popup message, we want to change the value of the cell to 0 and no message box, is there a way to do it?
Thanks,
Chunhui
ADAdministrator Syncfusion Team May 11, 2005 02:53 AM UTC
In CurrentCellValidating, you can test for grid.CurrentCell.Renderer.ControlText.Length == 0. If this is the case, try setting grid.CurrentCell.Renderer.Control.Text = "0". (Note, one of these is ControlText and the other is Control.Text).