How can I get the value of a cell from a DataGrid (WPF)? I have this:
DataRowView item = (DGContactos as DataGrid).SelectedItem as DataRowView;
_contacto.Nombre = item.Row.ItemArray[0].ToString();
_contacto.NumeroCelular = item.Row.ItemArray[1].ToString();
_contacto.NumeroTrabajo = item.Row.ItemArray[2].ToString();
_contacto.NumeroParticular = item.Row.ItemArray[3].ToString();
_contacto.Email = item.Row.ItemArray[4].ToString();
_contacto.Notas = item.Row.ItemArray[5].ToString();
That works well and gives me all the values.
Apart I want to know the specific value of the cell that receives the focus example: string valueCeld = DGContacts ....
I have tried several ways and I have several days searching the net and I only find for DataDridView.