I try to use the Spinbutton functionality of UltraNumericEditor. Since that functionality is really poorly implemented (come on, guys - how hard can it be to integrate some kind of Increment property that allows in-/decrementing in steps others than just 1....), i'm trying to implement that myself, using the EditorSpinbuttonClick event. Problem is - that event never fires. In fact, there seems to be no possibility of intercepting the spinbutton clicks at all. Juuuuust great... :-(
Any hints to why that wouldn't work? Anyone out there with similar problems? I'm using NetAdvantage 8.1 under VS 2008 on Vista, btw...
cgdams said:this is really a trap that's too easy to get caught in.
Yes, I agree. The problem is that the spin button was always there and the EditorButtons (and the EditorSpinButtonClick event) were added to the control later.
cgdams said:At least the description of the EditorSpinbuttonClick Event should provide some sort of caveat to this situation.
I agree with this also. I'm surprised there is no mention of this in the documentation. You shoulr report this to Infragistics Developer support so they can correct it. Submit an incident to Infragistics Developer Support
Thanks for the fast answer, Mike,
the solution you're proposing works for me. Hope you don't mind me saying that, but this is really a trap that's too easy to get caught in. At least the description of the EditorSpinbuttonClick Event should provide some sort of caveat to this situation. SpinEditorbutton not being SpinEditorbutton is something you wouldn't really expect.
Good to know though that you support people are there to save my ass from time to time...
Hi,
It's actually not that simple to implement an increment, because right now, the control increments and decrements the appropriate section based on the position of the cursor. And since the control is flexible and has a variable number of sections (based on the mask), exposing the increments is not a trivial matter.
The EditorSpinButtonClick event does not fire, because the built-in spin button you see on the control is not an EditorSpinButton.So what you need to do it turn off the normal spin button (SpinButtonDisplayStyle = Never). Then use the ButtonsRight property to add a SpinEditorButton. Clicking this button will fire the EditorSpinButtonClick event.