public void ClearList() { SelectedItems.Clear(); SelectedItemsList.Clear(); SelectedItemsList.Controls.Clear(); AddHeaderItem(); ClearFooter(); }
void CustomDataGrid_SelectionChanged(object sender, SelectionChangedEventArgs e) { SelectedItemsList.Clear(); foreach (var item in this.SelectedItems) { this.SelectedItemsList.Add(item); } }