First My English it so bad, i hope you know what i want to ask you.
This is my code
private void dataGrid_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
string MaNV = dataGrid.SelectedValue.ToString();
Nhan_Vien nv = dsnhanvien.Single(a => a.MaNV.Trim() == MaNV);
txtMaNV.Text = nv.MaNV;
txtHo.Text = nv.Ho;
txtTen.Text = nv.Ten_Dem;
txtDiaChi.Text = nv.Dia_Chi;
txtGioiTinh.Text = nv.Gioi_Tinh;
txtLuong.Text = nv.Luong.ToString();
}
I get an error when i click 1 colum in my DataGrid
An unhandled exception of type 'System.ArgumentNullException' occurred in System.Core.dll
Additional information:
Value cannot be null