Hi there,
since updating from v10.2 to v18.1 the DoublePositiveWithSpin doesn't work when clicking the part after the comma and trying to modify the value with arrow keys. It only works using the part before the comma. Was there some change in the API that I'm not aware of?
UltraGridColumn columnEmissivity = m_ultraGrid.DisplayLayout.Bands[0].Columns[iRowEmissivity];columnEmissivity.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DoublePositiveWithSpin;columnEmissivity.MaskInput = "-nn.nn";Thanks in advance
Flo
PS: I also tried using a sample I found somewhere on this website together with v19.1 which didn't change anything.
Hello Florian,
Thank you for contacting Infragistics!
I have done some looking into this matter and have some questions. What version/service release of v18.1 and v19.1 are you using? When I test this with v19.1.150 I do not reproduce the issue in most cases. I only see this when the starting value is 0.00. Do you see this behavior in any other case?
5554.UltraWinGrid.zip
I'm using 18.1.20181.305 and 19.1.20191.82 and can confirm that your solution file works.
In my sample mentioned above with 19.1.20191.82 it still doesn't work:
UltraGridAddRowUserControl.zip
Do you have any hint what might be the reason?
I ran your sample and it comes up with focus already in a grid cell with a mask. So I tried using the arrow keys and they work fine for me. Is that where the problem occurs for you? Or am I looking at the wrong cell or something?
I am using the latest internal build here. So it's possible that this was a bug in build 82 that has since been fixed. You might just want to try getting the latest service release and/or bi-weekly build and see if that fixes it.
Do the arrow keys only fail to work when the cell is initially blank? If the cell already has a value that you typed in, do the arrows work at that point?
Arrow keys after loading (left side of the comma) work fine, but when I move the carret right side of the decimal delimiter, arrow keys do not work anymore, regardless if there is a value after the comma or just the blank line.
Hi Florian,
Just a quick update on this. I am still looking into fixing it. But the root of the issue seems to be that we changed the default spinning behavior of the masked editor. So you can work around the issue and revert to the old behavior by setting:
Infragistics.Win.EditorWithMask.SpinWrapBehaviorDefault = Infragistics.Win.UltraWinEditors.SpinWrapBehavior.NoWrapping;
This is a static property that will affect all of the masked editors in your application, so you only need to set it once, maybe in your Main method or in the Form_Load of your main form. And that should revert to the old behavior so everything works like it did in the older version(s).
Hi Mike,
after taking a second look at it, there's still a problem:
I use this setup:
columnEmissivity.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DoublePositiveWithSpin; columnEmissivity.MaskInput = "-nn.nn"; columnEmissivity.PromptChar = ' '; columnEmissivity.MinValue = 0f; columnEmissivity.MaxValue = 1f; columnEmissivity.Nullable = Infragistics.Win.UltraWinGrid.Nullable.Disallow; columnEmissivity.CellClickAction = CellClickAction.EditAndSelectText;
Using the arrow keys up and down works, until I reach the maximum of 1.00
Then both spinner buttons get deactivated and I'm not able to decrease 1.00 anymore except changing the value with keyboard.
Is there also a workaround for this?
Best regards,
Hi Flo,
I looked into this and I think this is correct behavior... even though it seems kinda odd and undesirable. This behavior is not new and it's not related to the change in versions. I tried it out as far back and 9.2 and got the same results.
The issue is that since you are spinning a section, and there's no wrapping, you can't spin down from 00 in the faction part of the value, since that would spin you into a negative number. The fractional part of the value has a range from 00 to 99 and so you can't spin down from 99 without wrapping.
The reason you can't spin up in this case is that the value is already 1.00, so that's the maximum, so spinning up would result in a value of 1.01 which exceeds your MaxValue.Maybe instead of NoWrapping, you should use:
Infragistics.Win.EditorWithMask.SpinWrapBehaviorDefault = Infragistics.Win.UltraWinEditors.SpinWrapBehavior.WrapCurrentSection;
That seems to work the way you want.
Yes, that's what I saw, as well. I think you and your users would be happier using WrapCurrentSection. Or WrapAcrossSections, once we get it fixed. :)
I digged out the old release in which it still worked and turns out, that that one's behavior is identical to the behavior I have now with NoWrapping.