I am trying to implement "Copy selected column" using context menu. Following code works fine in a plain grid but when a band is introduced it fails. Is there any other way I can implement this functionality?
public static string GetDataFromEntireColumn(UltraGridCell currentCell, UltraGrid grid, bool includeHeader) { StringBuilder columnData = new StringBuilder(); if (currentCell != null) { foreach (UltraGridRow row in grid.Rows) { columnData.Append( row.Cells[currentCell.Column.Key].Text + Environment.NewLine); } if (includeHeader) { columnData.Insert(0,currentCell.Column.Header.Caption + Environment.NewLine); } } return columnData.ToString(); }
Thanks in advance
That's exactly what I want to know. How to find correct ChildBands collection in which the CurrentCell exists?
Thanks