public void FocusedRowRestoringHelper_RestoreRow_AfterDataSourceChanged() { string[] s = new string[] { "aaa", "x", "x", "\\", "\\\\", "\\x", "_x_", "_\\x_" }; GridControl grid = new GridControl() { View = new TableView() }; FocusedRowRestoringHelper.SetItemsSourceInterface(grid, new List <string>(s)); grid.SelectedItem = s[3]; FocusedRowRestoringHelper.SetItemsSourceInterface(grid, new List <string>(s)); Assert.AreEqual(s[3], grid.SelectedItem); }
public void FocusedRowRestoringHelper_RestoreRow_AfterViewChanged() { string[] s = new string[] { "aaa", "x", "x", "\\", "\\\\", "\\x", "_x_", "_\\x_" }; GridControl grid = new GridControl() { View = new TableView() }; FocusedRowRestoringHelper.SetItemsSourceInterface(grid, new List <string>(s)); grid.View.MoveNextRow(); grid.View.MoveNextRow(); FocusedRowRestoringHelper.SetViewInterface(grid, new CardView()); Assert.AreEqual(grid.SelectedItem, s[1]); }