【发布时间】:2013-09-04 14:27:32
【问题描述】:
如何获取 DataGrid 上单击/选定单元格的索引?
我的 DataGrid 列自动生成,我不想使用任何 DataTemplate 。
<DataGrid ItemsSource="{Binding Table, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, IsAsync=True}"
AutoGenerateColumns="True">
</DataGrid>
【问题讨论】:
-
“索引”这个词是什么意思? DataGridCell 或 DataGridCellInfo 中没有这样的属性
-
你想用索引做什么。什么时候可以有实际价值。