I am implementing an EditorWithMask editor in a specific UltraGridCell so that I can add an EditorButton on the right as well as a SpinButton. The problem I have with the code below is that it will not allow negative values to be entered. Please can someone help?
Dim num As New Infragistics.Win.EditorWithMasknum.ExpectedType = GetType(Single)num.SpinButtonDisplayStyle = Infragistics.Win.SpinButtonDisplayStyle.OnRightDim btn As New Infragistics.Win.UltraWinEditors.EditorButton()btn.Text = "::"AddHandler btn.Click, AddressOf <SubProcedure>num.ButtonsRight.Add(btn)row.Cells(0).Editor = num
I have tried setting the Cell Style as below, but this makes no difference
row.Cells(0).Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DoubleWithSpin
Thanks very much for your assistance Mike. I now have exactly the result I was looking for.
Thanks for your help - I have made some progress using UltraNumericEditor, but this has now raised another problem. If you review the sample code below, the btn.Click event now does not fire when added to the UltraNumericEditor control. It was fine with the original EditorWithMask editor. Is there a property I need to change for this event to fire?
Dim num As New Infragistics.Win.UltraWinEditors.UltraNumericEditornum.MaskDisplayMode = Infragistics.Win.UltraWinMaskedEdit.MaskMode.IncludeLiteralsnum.NumericType = Infragistics.Win.UltraWinEditors.NumericType.Doublenum.MaskInput = "-nnnnn.nn"num.SpinButtonDisplayStyle = Infragistics.Win.ButtonDisplayStyle.Alwaysnum.SpinButtonAlignment = Infragistics.Win.ButtonAlignment.RightDim btn As New Infragistics.Win.UltraWinEditors.EditorButton()btn.Text = "::"AddHandler btn.Click, AddressOf <SubProcedure>num.ButtonsLeft.Add(btn)row.Cells(0).EditorControl = num
The problem with this is that each cell/row in the column could have a different data type and therefore a different input mask. Is there a way of setting the MaskInput at the Cell level?