How to get cell value of gridview in wpf which is insidelist
How to get cell value of gridview in wpf which is inside listview
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Bala MuruganPosted Aug 28, 2014, 4:22 AM
{
if (dgDetails.SelectedItem != null)
{
if (dgDetails.SelectedItem.ToString() != null)
{
int ID = Convert.ToInt16(dgDetails.SelectedItems[0].GetType().GetProperty("ID").GetValue(dgDetails.SelectedItem, null));
EmpStudent customer = (from p in objSampleEntities1.EmpStudents
where p.ID == ID
select p).Single();
lblhdID.Content = ID;
txtFirstName.Text= customer.FirstName;
txtLastName.Text= customer.LastName ;
txtEmailId.Text = customer.EmailId ;
txtContactNum.Text= customer.ContactNo.ToString();
btnSave.Content = "Update";
List();
}
}
}