I have a UltraNumericEditor (defined as below) that I use as the EditorControl for a UltraDataGrid cell. But when I try to leave the control empty I get the following error displayed:
DATA ERROR Unable to convert from '(null)' to 'System.Int32'
Definitionthis.uneCheckValues.Location = new System.Drawing.Point(767, 109); this.uneCheckValues.MaskClipMode = Infragistics.Win.UltraWinMaskedEdit.MaskMode.IncludeBoth; this.uneCheckValues.MinValue = 0; this.uneCheckValues.Name = "uneCheckValues"; this.uneCheckValues.Nullable = true; this.uneCheckValues.PromptChar = ' '; this.uneCheckValues.TabIndex = 16; this.uneCheckValues.Visible = false;
Entry in the cell is not required, so how can I allow for nulls (if no entry)?
Hi,
There are two reasons I can think of why this might happen:
1) The DataType of the column does not allow nulls. What's your data source and what is the DataType on this column?
2) This is a FirstChance exception which would be caught by the control and you are only seeing it becuase you have set the IDE to break on all run-time exceptions.
Hi Mike.
I have encountered the same issue.
I can confirm the DataType of the column is "double* NOT nullable.
Do you have a solution for it?
Thanks.
1) The datasource is the result of a sql server stored proc. I have a temp table defined with the column defined as "INT NULL", but I generate the stored proc results as a pivot table of this original temp table. Would the pivot table not also have the column defined as nullable?
2) I am not exactly sure how to set this as "break on all exceptions", but from what I can tell this is not the case. Anything specific I can check in the IDE (running C# 2005 winforms)