Format and Edit column in a ultragrid

Answered (Verified) This post has 2 verified answers | 5 Replies | 3 Followers Thread's RSS feed.

Wei Yu
Points 55
Replied On: Thu, Sep 12 2013 1:39 AM Reply

Hi, Please help me out with this problem.

I am trying to edit a cell in ultragrid. Column format is set so the displayed data is correct, but when I enter edit mode, the value changes to some other formats.

I did a search and tried to use MaskInput for edit mode, but I can't solve my problem. I ll show an example.

I have value 100.00 in the cell, the format property is set to make it display 100.00, but when I edit it, it become 100.0000, I want to keep it at 100.00.

I tried to set MaskInput as nnn.nn, but the input value may not be 100.00 in other cells. another cell has value of 12345.55 and maskinput as nnn.nn doesn't work.

I also tried to set MaskInput as nnnnnnnn.nn, then the value of 100.00 become _______100.00 in edit mode, which is also not what I want.

How do I keep the value of 100.00 in edit mode to match the display mode?

cheers

  • Post Points: 20

Verified Answer

Georgi
Points 53,420
Infragistics Employee
Answered (Verified) Replied On: Thu, Sep 12 2013 3:14 AM Reply
Verified by Wei Yu

Hello Wei,

I try to reproduce your issue with MaskInput using our latest available version 13.1.20131.2060, but without success. In my test sample everything works properly. Could you please tell me what is your current version and do you have any installed service release and which one. Also are you using Column`s Style settings or maybe EditorComponent into your scenario.

Please take a look at the atatched sample and video file and if you have any questions, feel free to write me

Regards

Georgi
Senior Developer Support Engineer, MCPD
Infragistics, Inc

www.infragistics.com

  • Post Points: 40
Mike Saltzman
Points 435,015
Infragistics Employee
Answered (Verified) Replied On: Fri, Sep 13 2013 9:39 AM Reply
Verified by Wei Yu

You can't mask differently for positive, negative, and 0 like you do for formatting.

Something like this would probably be as close as you can get:

-nnnn.nnnnnnnnnnnn

Mike Saltzman

Manager - Windows Forms Development

Infragistics, Inc.

  • Post Points: 25

All Replies

Georgi
Points 53,420
Infragistics Employee
Answered (Verified) Replied On: Thu, Sep 12 2013 3:14 AM Reply
Verified by Wei Yu

Hello Wei,

I try to reproduce your issue with MaskInput using our latest available version 13.1.20131.2060, but without success. In my test sample everything works properly. Could you please tell me what is your current version and do you have any installed service release and which one. Also are you using Column`s Style settings or maybe EditorComponent into your scenario.

Please take a look at the atatched sample and video file and if you have any questions, feel free to write me

Regards

Georgi
Senior Developer Support Engineer, MCPD
Infragistics, Inc

www.infragistics.com

  • Post Points: 40
Georgi
Points 53,420
Infragistics Employee
Replied On: Thu, Sep 12 2013 3:15 AM Reply

Here is the video file

Georgi
Senior Developer Support Engineer, MCPD
Infragistics, Inc

www.infragistics.com

  • Post Points: 5
Wei Yu
Points 55
Replied On: Thu, Sep 12 2013 6:30 PM Reply

Hi there,

Thanks for the video, and I think setting PromptChar to empty space ' ' does the trice, without setting it, the default PrompChar seems to be '_'. 

But there is another question, 

My display Format is set to "#,##0.00##########;-#,##0.00##########;0.00;";

How should I mask the input?

  • Post Points: 35
Georgi
Points 53,420
Infragistics Employee
Replied On: Fri, Sep 13 2013 8:51 AM Reply

Hello Wei,

To be honest, I`m not sure that I understand what is your final goal. Could you please explain us what do you expect to achieve using such FormatString/MaskInput

Let me know if you have any questions.

Regards

Georgi
Senior Developer Support Engineer, MCPD
Infragistics, Inc

www.infragistics.com

  • Post Points: 5
Mike Saltzman
Points 435,015
Infragistics Employee
Answered (Verified) Replied On: Fri, Sep 13 2013 9:39 AM Reply
Verified by Wei Yu

You can't mask differently for positive, negative, and 0 like you do for formatting.

Something like this would probably be as close as you can get:

-nnnn.nnnnnnnnnnnn

Mike Saltzman

Manager - Windows Forms Development

Infragistics, Inc.

  • Post Points: 25
Page 1 of 1 (6 items) | RSS