Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
395
Masking, formatting cell value
posted

Hi,

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? How do I format string 1234567       890 with spaces to be displayed as 123|456|7_._|_|__.__|890?

Parents Reply Children
No Data