1

我怎么可能获得 DataGrid 的选定行索引,然后手动设置它?

问候

佩索尔

4

1 回答 1

2

获取选定的行索引:

int i = myDataGrid.SelectedIndex;

设置选定行索引:

myDataGrid.SelectedIndex = 4;
于 2012-04-06T13:20:56.830 回答