DataRowView row = (DataRowView)usersTable.SelectedItem; int id = int.Parse(row.Row.ItemArray[0].ToString());