I add the following Delete button to the grid column. However, the button is also added to the "new row" template. It should only be added to the data rows. I tried several things to set the style of the cell in InitializeRow when e.Row.IsAddNew, but nothing has helped.
using (GridColumnConfig columnConfig = new GridColumnConfig(gridBand)){ UltraGridColumn col = columnConfig.Add(c_sDeleteColKey, string.Empty, 0); col.ButtonDisplayStyle = Infragistics.Win.UltraWinGrid.ButtonDisplayStyle.Always; col.CellButtonAppearance.Image = Properties.Resources.Office2003Delete_black_; col.CellButtonAppearance.ImageHAlign = Infragistics.Win.HAlign.Center; col.FilterOperandStyle = FilterOperandStyle.None; col.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Button; col.MaxWidth = 25; col.MinWidth = 25;}
Hi, unfortunately, that did not change anything.
private void gridPriorityToolRules_InitializeRow(object sender, InitializeRowEventArgs e) { if (e.Row.IsAddRow) { e.Row.Cells[c_sDeleteColKey].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Button; } }