public async System.Threading.Tasks.Task ReStoreViewSettingDetailControlAsync() { using (var dt = UnitTestStatic.GetDataTable()) { using (var dc = new DetailControl()) { dc.HTMLStyle = UnitTestInitializeWin.HTMLStyle; dc.DataTable = dt; await dc.RefreshDisplayAsync(FilterType.All, UnitTestInitializeCsv.Token); var columnFilters = new List <ToolStripDataGridViewColumnFilter> { new ToolStripDataGridViewColumnFilter(dc.FilteredDataGridView.Columns[0]) }; columnFilters[0].ColumnFilterLogic.Operator = "="; columnFilters[0].ColumnFilterLogic.ValueText = "Halloween"; columnFilters[0].ColumnFilterLogic.Active = true; var text = ViewSetting.StoreViewSetting(dc.FilteredDataGridView, columnFilters); var fn = System.IO.Path.Combine(FileSystemUtils.ExecutableDirectoryName(), "test.delete"); FileSystemUtils.FileDelete(fn); FileSystemUtils.WriteAllText(fn, text); dc.ReStoreViewSetting(fn); FileSystemUtils.FileDelete(fn); } } }