Silverlight DataGrid how to get cell value from a selected item?

后端 未结 4 1978
孤街浪徒
孤街浪徒 2021-01-13 23:50

I am trying to get a cell value from the selected item of a silverlight datagrid. In the attached code I can get to the properties of the cell and change its forecolor, but

4条回答
  •  情话喂你
    2021-01-14 00:38

    private void FindDetails_SelectionChanged(object sender, SelectionChangedEventArgs e)
    {
      DataGrid dataGrid = sender as DataGrid;
      var item = dataGrid.SelectedItem;
      if (item != null)
      {
        //in here you can get the properties with the "item"'s object
      }
    }
    

提交回复
热议问题