Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
230
Hierarchical Grid - Select column through all bands
posted

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:

int prevBandIdx = 0;
List<UltraGridCell> listCell = new List<UltraGridCell>();

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.

Parents Reply Children
No Data