void ButtonOK_Click(object sender, RoutedEventArgs e) { ObservableCollection <string> ids = new ObservableCollection <string>(); foreach (var id in DtGrid.SelectedItems) { ids.Add(((V_RELATIONPOST)id).RelationPostID); } client.RelationPostDeleteAsync(ids); }