我正在尝试修改从数据库中提取的网格视图中的行中的数据。
数据被绑定到每个 gridview 列,如下所示。
<GridViewColumn Header="Status" Width="120" util:GridViewSort.PropertyName="Status">
    <GridViewColumn.CellTemplate>
        <DataTemplate>
            <TextBlock Text="{Binding Path=Status}" FontWeight="Bold" MouseLeftButtonDown="TextBlock_MouseLeftButtonDown_1"/>
        </DataTemplate>
    </GridViewColumn.CellTemplate>
</GridViewColumn>
我在文本块上有一个 MouseLeftButtonDown 事件,当我单击特定文本时会触发该事件。
private void TextBlock_MouseLeftButtonDown_1(object sender, MouseButtonEventArgs e)
{
    MessageBox.Show("Hello");
}
我遇到的问题是我找不到访问行数据的方法(例如 id 或行中的文本)。
有没有办法从点击事件中访问所有行数据?
谢谢