Hi All,
By default Im getting only 2 decimal places by using the following column style.
ColumnStyle.Double
I need to have 6 decimal places, how to get that..please do the needful bit urgent.
With Thanks & Reagrds
Amjath
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { UltraGridLayout layout = e.Layout; UltraGridBand band = layout.Bands[0]; band.Columns["Double 1"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Double; band.Columns["Double 1"].MaskInput = "nnnnnnnnn.nnnnnn"; }
Hi Mike Thanks a lot its working fine...
I have one doubt, is it possible to just give the decimal places alone. I mean I dont want to limit the digits before decmial point.
i mean "nnnnnnnnn.nnnnnn" basically i dont want to give the bold text (means user can type any number of values i just want to fice the decimal places alone to 6)
is that possible ???
waiting for your reply
With Thanks
Hi,
No.. if you are using a mask, then the mask always limits the user to a specific number of digits. The only way to not have a limit would be to not use any mask, which means you should not set the Style on the column at all, and then the user can type anything they want into the cell.
Hi Mike,
Thanks Mike
Then is there anyway to specify that the cell will allow only digits . and - sign alone no other characters
With Thanks & Regards
Not really. I mean you could try trapping the KeyDown event and cancel it (mark the event args handled) for any non-numeric keys. You would probably have to do this for the TextBox in the cell, though, and not the grid itself. I'm not absolutely sure. But then you would also have to allow any other valid keys like the arrow keys. then there's copy and paste to consider, as well as Delete. It get complicated pretty fast.
If the DataType of the column is a double, then the user's entry will be validated when they try to leave the cell. But not as they type.
if im using the way u suggested
band.columns["Double 1"].maskinput = "-nnnnnnnnnnn.nnnnnn";
is there anyway i can add the thousand separator ??
is this is do that "-n,nnn,nnn,nnn.nnnnnn"
please suggest
Many Thanks
Hi Mike
one more thing on editig its fine now, but after i tabbed out the thousand separator got disappered please suggest
many thanks
Thank you
band.Columns["Double 1"].MaskDisplayMode = Infragistics.Win.UltraWinMaskedEdit.MaskMode.IncludeLiterals;