更新时间:2023-12-03 18:41:58
遍历单元格并选择每个列单元格 -grid.ClearSelection();
for ( int r = 0 ; r< grid。 RowCount ; r ++)
grid [columnIndex,r] .Selected = true;
Ex
===============|==============================
= Col1 Header| Col2 Header |
===============|==============================
= A | 1 |
= B | 2 |
= C | 3 |
= | |
===============|=============================|
While selecting col1 Header means, select A,B,C only. not 1,2,3.
Loop through the cells and select each column cell -grid.ClearSelection(); for(int r = 0; r < grid.RowCount; r++) grid[columnIndex, r].Selected = true;