Hello
I want to have Numeric Editor with different ranges in grid.
I will have column with numeric values, which will be edited by Numeric Editor.
Can I assign different minimal/maximal values for each numeric editor in each row?
Can I assign different number of digits after point (0.001 or 0/1 or 1 or ) for each numeric editor in each row?
Hi Aleksander,
I think you can acheive what you want using editors. What you would do is add an UltraNumericEditor to your form. You would need a different UltraNumericEditor control for each different mask and min/max value combination. You would set the Mask properties you want on the UltraNumericEditor and assign that control to the EditorControl proprety of the cell in the grid. You would probably do this in the InitializeRow event of the grid.
By default, the grid column's mask settings override those of the editor. So in order for this to work, you must set UseEditorMaskSettings on the column to true.
That should take care of the decimal places. But I'm not sure if the grid will pick up the Min/Max value from the editor. I suspect it will not. If that's the case, then this becomes more complicated. What you would have to do in that case is use an EditorWithMask that you create in code and apply a DefaultOwner to it. So you would have to implement your own owner class that returns the Min/Max values you want. Then you would set the Mask properties on the editor and use the Editor property of the column rather than EditorControl.
Ok, Thank you.
We have one more variant of realization of our functionality.
We want to use usual Editor or EditorWithMask in grid cells and! show error messages if entered value is less, than our minimum. Could you say, how we can do it? We want user not to leave the cell if the value is wrong and the error mark will show him the reason of the error.
The grid doesn't have any built-in functionality to show an error message in a cell.
Hello,
I've meant the custom error message, (I will set it on BeforeExitEditMode if needed), which I want ot show near the cell.
So the problem is to show it near the cell. Is it possible?
I'm not sure what you mean by "he error mark will show him the reason of the error.". You might be looking for the SupportDataErrorInfo. Or you could use BeforeExitEditMode or BeforeCellUpdate event to validate the data.