private void CommandBinding_Delete(object sender, ExecutedRoutedEventArgs e) { try { V3Data col = (V3Data)allElements.SelectedItem; currentCol.Remove(col.Data, col.Time); } catch { MessageBox.Show("Не удалось удалить элемент из коллекции.", "Ошибка."); } }
private void byCollection_Filter(object senderr, FilterEventArgs args) { V3Data item = args.Item as V3Data; if (item is V3DataOnGrid) { args.Accepted = false; } else { args.Accepted = true; } }
private void V3DataOnGridViewFilter(object sender, FilterEventArgs args) { V3Data item = (V3Data)args.Item; if (item != null) { if (item.GetType() == typeof(V3DataOnGrid)) { args.Accepted = true; } else { args.Accepted = false; } } }