I wonder what mask shall be set to format string during entering.
I have format string set to ###,###,##0
So numbers are displayed correctly when loosing focus from cell
I wonder if I can setup similar input mask allowing user to see thousands separator when he imputs numbers (eg if he is entering 123456, he will see 123,456 still beeing in edit mode)
My current input mask is nnnnnnnnn
Shame! I didn't realize Column has MaskInput property !
Works as a harm now. Many thanks!
Hello,
I am sure what kind of data type you are using in your column, but I have used Int dataType column and just set the following properties of the column in the IntializeLayout event of the UltraGrid without using any extra editors like:
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { e.Layout.Bands[0].Columns["Int"].MaskInput = "nnn,nnn,nnn"; e.Layout.Bands[0].Columns["Int"].Format = "###,###,##0"; }
Please let me know if you need further assistance with this matter.
You are right this is working if FormatString is not set.
But problem is when you leaving cell edit mode entered number is displaed as 123456 instread of 123,456 which is hard to read to user.
I'm looking way to enable user input numbers with separators as well as display those numbers that way
Any idea how to archive that ?
PS
I'm using EditorWithMask (code presented below)I have set FormatString to: "###,###,##0" and Input Mask to "nnn,nnn,nnn"
UltraGridColumn column = this.ultraGrid.DisplayLayout.Bands[0].Columns["whatever"];EditorWithMask editorWithMask = new EditorWithMask();column.Editor = editorWithMask;
I have not set the FormatString, but I have set the following and it seems that it works as you expected:
ultraMaskedEdit1.InputMask = "nnn,nnn,nnn"; ultraMaskedEdit1.PromptChar = ' ';
I believe that you are probaly setting you InputMask something like "###,###,###" and that's why you are seeing the following output in edit mode:
12_,___,___
Please let me know if you have any other questions.
nnn,nnn,nnn - doeasnt work becaus it shows mask as follow
So user entry starting from left, but not right.
Can you give some quickl example with NumberFormat - maybe I missing something ...
Thanks!