Dear all,
I have the ultragrid with fields : How can I group by ProductName and Sold Qty with merging the Cells.
I want to be this:
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { UltraGridLayout layout = e.Layout; UltraGridOverride ov = layout.Override; ov.MergedCellStyle = MergedCellStyle.OnlyWhenSorted; ov.MergedCellAppearance.TextVAlign = VAlign.Top; }
Do I need to specify the columns name or row number???
Hi,
The code I above will apply to all columns in the grid. You can apply this to a single band by using the Override object on the band instead of the one on the DisplayLayout.
If you want to set merging on each individual column, you can do that, too.You just set the MergedCellStyle on the column.
You can, in fact, set all three. The column setting will take precedence, then the band setting, and then the DisplayLayout.