Hi
Is there any possibility to select column through all bands without iterating through all rows and adding the cells to the selected cells collection?
My code:
foreach (UltraGridRow ugr in ultraGrid.Rows.GetRowEnumerator(GridRowType.DataRow, null, null)){if (ugr.Band.Index != prevBandIdx){ultraGrid.Selected.Cells.AddRange(listCell.ToArray());listCell.Clear();}listCell.Add(ugr.Cells[ugc.Key]);prevBandIdx = ugc.Band.Index;}
The solution above is not really with good performance. Thank you for your help.
How about this:
foreach (UltraGridBand band in this.ultraGrid1.DisplayLayout.Bands) { this.ultraGrid1.Selected.Columns.Add(band.Columns["Boolean 1"].Header); }
Hi Mike
I tried your example but that does not work. It just selects the column of the first band...
Kind regsDan
Hi Dan,
I tested this out before I posted it and it works fine for me. Is the Key of your column the same in every band? Are you setting SelectTypeCol on some bands to that selecting columns is not allowed?