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?
ADAdministrator Syncfusion Team May 10, 2005 09:53 PM
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).