private void DataGrid_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
try
{
var row_list = (Item)dg.SelectedItem;
listblock1.Content = "You Selected: " + row_list.FirstName + " " + row_list.LastName;
}
catch { }
}
public class Item
{
public string FirstName { get; set; }
public string LastName { get; set; }
}