private void OnContinuationFunction(Task <DataTable> t) { try { _guiThread.Invoke(() => { _loadDataResult = t.Result; PropertiesSupergrid.RememberSelection(); PropertiesSupergrid.RestoreSelectionAfterRefresh(); PropertiesSupergrid.SuspendLayout(); PropertiesSupergrid.PrimaryGrid.Footer.Text = " "; PropertiesSupergrid.RefreshData(_loadDataResult); PropertiesSupergrid.ResumeLayout(false); PropertiesSupergrid.PerformLayout(); }); } catch (Exception ex) { Trace.WriteError("()", nameof(OnContinuationFunction), CLASSNAME, ex); } finally { IsRefreshing = false; } }
private DataTable LoadDataTask() { try { IsRefreshing = true; PropertiesSupergrid.SuspendLayout(); return(GetPropertiesDataTable()); } catch (Exception ex) { Trace.WriteError("()", Trace.GetMethodName(), CLASSNAME, ex); return(null); } }