Hi,
Sorry to write this question again, but nobody from development team replied since June. I would appreciate any reply at all. If you need more info, tell me. If the thing I want to do is not possible, please tell me.
I have various data in ultragrid and I would like to format some data in the cell.
So I have a string:
1234567 890
and I would like to format it in the following way:
123|456|7_._|_|__.__|890
I tried following approach:
UltraGridColumn.MaskInput = "aaa|aaa|aa.a|a|aa.aa|aaa";
UltraGridColumn = MaskMode.IncludeBoth;
The problem is that it does not work as expected. Data are displayed like this:
123|456|7_._|_|_8.90|___
I have found out that the problem is present when string I want to format includes spaces. As long as I remove the spaces everything is fine. I have replaced space with x. String now looks like this:
1234567xxxxxxx890
Formatted string is displayed as expected:
123|456|7x.x|x|xx.xx|890
I have numbers in the sample, but they should be treatet as string. So instead of 1234 I can have abcd.
So my question is what do I do wrong? Is this even possible?
Thank you for replying.
Well we have released the application already.
We had to use Windows.Forms.MaskedTextBox control for editation purposes.
For displaying purposes it was more difficult, as we use UltraGrid. At the end we found working DataFilter:
var box = new EditorWithText { DataFilter = new MyMaskingFilter() };
UltraGridRow.Band.Columns[name].Editor = box;
MyMaskingFilter processes data, implements mask and returns text with applied mask.
------------------------------------------------------------------------
Solution as discussed with support
This task cannot be done in one simple step as I planned. When using only Infragisitcs, it needs to be done in two steps:
From the mail conversation:
"... it was happening because you had the MaskMode set to MaskMode.IncludeBoth, but you were only including the padding in your input, not the literals. In order for the control to work as designed, you should include both padding and literals in the input ..."
Hello kyso,
The next service release is scheduled for mid-November. Is this a production application? Do you have a deadline to meet?
Hello Dave,
is anything new about this issue? I can see that it is in development since 20th of July. Do you know if fix will be available and when?
Thanks for answering.
Hello,
I have logged this as a development issue.
I took a look at the sample and I am getting the same results you describe.It looks like the spaces are being processed by the literal characters in the mask. The decimal and two | symbols seem to be counting as space characters, which essentially removes 3 spaces and leaves them at the end.
I'm not sure why that should be the case, but obviously the EditorWithMask is treating a space differently from other characters for some reason.
I forwarded this thread over to Infragistics Developer Support so they can write this up for developer review.