I have set ultragrid column style is ColumnStyle.IntegerWithSpin , Now i want to give spinwrap to this cell.
So, how can i set spinwrap in ultragrid cell ?
Hi,
If you want all IntegerWithSpin columns in the grid to wrap, then you could do this like so:
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { UltraGridColumn intColumn = e.Layout.Bands[0].Columns["Int32 1"]; intColumn.MaxValue = 100; intColumn.MinValue = 0; intColumn.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.IntegerWithSpin; EditorWithMask editorWithMask = (EditorWithMask)intColumn.Editor; editorWithMask.SpinWrap = true; }
You just have to be a little bit careful with the last 2 lines of code. The grid re-uses the same editor for every column that has the same Style. So if you have 10 columns in your grid that all use IntegerWithSpin style, they will all use the same editor. Therefore, you only need to set the SpinWrap property on the editor once and it will apply to all 10 columns.
If you want each column to have a different setting, then you would have to assign a new EditorWithMask to each column and set it's properties individually.