Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
378
Numeric Editor with different ranges in grid
posted

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?

 

Parents
  • 469350
    Verified Answer
    Offline posted

     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.       

Reply Children