public void Refresh() { _returnedItemSource = _itemReturnHandler.GetItemReturns(SearchTextBox?.Text, _itemId, _isHandled); InventoryDataGrid.ItemsSource = _returnedItemSource; InventoryDataGrid.GetBindingExpression(ItemsControl.ItemsSourceProperty)?.UpdateTarget(); }
private void RefreshDataGrid() { ItemSource = _productHandler.GetItems(name: SearchTextBox?.Text, productType: (ProductType?)ItemTypeComboBox?.SelectedIndex); InventoryDataGrid?.GetBindingExpression(ItemsControl.ItemsSourceProperty)?.UpdateTarget(); }