How can I Show MunericUpDown control as one of the editable columns in UltraGrid?
Please help on this.
Thanks,
Hi,
Hm, this code worked fine for me. Is the column's DataType double?
Did you set a MaxValue or a MinValue on the column?
If you can post a small sample project of the behavior you are getting, I'd be happy to take a look, but I don't know why that's happening off the top of my head.
Mike, I used the Editor as you suggested, but when I clicked the spin button, there is no change to the double and at the same time the spin button is disabled. Please give me some advice.
I tried this out and the spin buttons are context sensitive. If the caret is before the decimal point, they will spin by 1. If the caret is after the decimal point, they will spin by 0.1.
If you want it to always be 1, you will need to use an editor:
UltraGridColumn column = band.Columns["Double 1"]; column.Header.VisiblePosition = 1; column.MaskInput = "nnn.n"; column.MinValue = 0.0; column.MaxValue = 999.9; EditorWithMask editorWithMask = new EditorWithMask(); editorWithMask.SpinIncrement = 1; editorWithMask.SpinButtonDisplayStyle = SpinButtonDisplayStyle.OnRight; column.Editor = editorWithMask; column.ButtonDisplayStyle = Infragistics.Win.UltraWinGrid.ButtonDisplayStyle.Always;
band.Columns[6].MaskInput = "nnn.n"; band.Columns[6].MinValue = 0.0; band.Columns[6].MaxValue = 999.9; band.Columns[6].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DoubleWithSpin; band.Columns[6].ButtonDisplayStyle = Infragistics.Win.UltraWinGrid.ButtonDisplayStyle.Always;
I set the property as above. The default increament is 0.1. How can I set it as 1 when clicking the up or down narrow?
Any suggestion will be appreciated.
It works. Thanks your great support.