How can I Show MunericUpDown control as one of the editable columns in UltraGrid?
Please help on this.
Thanks,
Strictly speaking the answer to your question is to use the UltraControlContainerEditor to host a NumericUpDown control, and assign the UltraControlContainerEditor to the column's EditorComponent property.
Another approach is to use the column's masking and spin button capabilities to do it, like so:
UltraGridColumn column = e.Layout.Bands[x].Columns[y];column.MaskInput = "nnn";column.MinValue = 0;column.MaxValue = 999;column.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.IntegerWithSpin;column.ButtonDisplayStyle = Infragistics.Win.UltraWinGrid.ButtonDisplayStyle.Always;
It works. Thanks your great support.
Hi,
I took a look at your sample. It's not working because the DataType of your column is string. So there's no way the editor can do a numeric operation like adding 1 to the value, because it's not numeric.
Why are you storing numeric values as strings?
If you can, I would change it to a numeric type like Decimal or Double.
If you cannot, then you would have to use an EditorSpinButton and handle the Spin events yourself and modify the value in code.
Yes, you are correct. It works after I change the type to float. Is there a property to hide the underline in the editor?
johnny_lan said:Is there a property to hide the underline in the editor?
You can set the PromptChar property on the column to some other character, like a space. You could try an empty string, but I'm not sure if that will work.
column.PromptChar = " ";
It works for me. Thank you so much.
Could someone tell me how to change the style of the active column header as the attached? I don't want the orange border showing out when I focus on the header or buttons.
It depends on where that style is coming from. Judging by the sheer amount of styling going on in this screen shot, my guess is that you are probably use AppStylist. In which case this style will have to be changed in the isl file.
If you are not using AppStylist, then the header style is controlled by the HeaderStyle property on the Override object.
Yes, it works. Thanks a million.
Hi
how to make ultragrid decimal column , to make spin increment to zero
as like numeric editor property.
I'm afraid I do not understand what you are asking. You want a zero increment? What's the point of that?
I try your code but
editorWithMask.SpinIncrement not exist
Pleas help me.