private async void SetDataGridItems() { if (_Model == null) { await Dispatcher.UIThread.InvokeAsync(() => _DGVRows.Clear()); } else { var rows = _ShowOnlyRequestRowsWithErrors ? GetRowsErrorOrFinish(_Model.GetRows()) : _Model.GetRows(); //GetRowsNotNone( _Model.GetRows() ); var new_DGVRows = new ObservableCollection <LogRow>(rows); await Dispatcher.UIThread.InvokeAsync(() => DGV.Items = _DGVRows = new_DGVRows); ScrollToLastRowInternal(); } }
private void SetDataGridItems() { if (_Model == null) { DGV.Items = null; } else { DGV.Items = new DataGridCollectionView(_Model.GetRows()); } }