Hi,
I have a cell that displays a performance value. I need to display it as follows. 60.00% How can i do this. I set the style of column to double and datatype to decimal.
Also when in edit mode i should be able to enter something like 60.00G% or 60.00N% or 60.00 G %,etc... combinations... the G and N are the only alphabets it should accept. The reason for G and N is that based on the alphabet i set the value of another cell.
Can someone let me know how i can do this. Thanks for the help in advance
Cheers
Rajesh
Rajesh,
I'm not sure why this is happening, but I could reproduce the behavior, so you should submit an incident to Developer Support so they can look into it.
-Matt
Hi Matt,
Thanks for the reply. I have a new issue now for the percentage column when i set the format and mask input. The percentage column can be positive and negative in terms of performance. So when its a negative value and when i click on that cell the value in it is not displayed rather say lost.but when i dont update the cell value and just come out of it then the original value comes back. its the problem only with negative values.
Thanks in advance.
Regards
I don't think that there is any support for specifying that only a 'G' or 'N' can be entered within a mask. One option would be to handle the KeyDown event yourself and prevent it from propogating to the editor, though this would be complicated since you would have to see if the cursor is at the specific portion of the mask. The other option is to assign a regular expression to the RegexPattern property of the column, though I don't think that this will be checked until the user tries to exit edit mode on the cell.
An example of a mask that you might use is:
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e){ UltraGridColumn col = e.Layout.Bands[0].Columns["Col 1"]; col.MaskInput = "99.9>A%"; col.MaskDisplayMode = Infragistics.Win.UltraWinMaskedEdit.MaskMode.IncludeLiterals;}
You can find a list of supported mask characters here.