public void ChangeGridBandsOrderTest() { using (new GridsTestInitializer()) { DXTestControl accordionControlItem = new UIgridDemoWindow().UIGridNavigationClient.UIAccordionControl.UIAccordionControlGroupGridViews.UIAccordionControlItemBandedViews; Mouse.Click(accordionControlItem, new Point(1, 1)); DXCheckButton bandedViewCheckButton = new UIgridDemoWindow().UIGridPanelControl.UICheckButton; bandedViewCheckButton.Checked = true; DXGrid grid = new UIgridDemoWindow().UIGridPanelControl.UIGridContainerClient.UIGridViewStyleCustom.UIGrid; DXGridBand bandParent = new DXGridBand(grid, grid.Views[0].Name, "gridBand1"); DXGridBand bandChild1 = new DXGridBand(grid, grid.Views[0].Name, "gridBand2"); DXGridBand bandChild2 = new DXGridBand(grid, grid.Views[0].Name, "gridBand3"); int oldBandChild1Position = bandChild1.VisibleIndex; int oldBandChild2Position = bandChild2.VisibleIndex; bandChild1.SetBandPosition(bandParent.BandName, bandChild2.VisibleIndex); Assert.IsTrue(bandChild1.VisibleIndex == oldBandChild2Position && bandChild2.VisibleIndex == oldBandChild1Position); oldBandChild1Position = bandChild1.VisibleIndex; oldBandChild2Position = bandChild2.VisibleIndex; bandChild1.SetBandPosition(bandParent, bandChild2.VisibleIndex); Assert.IsTrue(bandChild1.VisibleIndex == oldBandChild2Position && bandChild2.VisibleIndex == oldBandChild1Position); oldBandChild1Position = bandChild1.VisibleIndex; oldBandChild2Position = bandChild2.VisibleIndex; bandChild1.SetBandPosition(bandChild2.VisibleIndex); Assert.IsTrue(bandChild1.VisibleIndex == oldBandChild2Position && bandChild2.VisibleIndex == oldBandChild1Position); } }
public void CheckGridBandParentTest() { using (new GridsTestInitializer()) { DXTestControl accordionControlItem = new UIgridDemoWindow().UIGridNavigationClient.UIAccordionControl.UIAccordionControlGroupGridViews.UIAccordionControlItemBandedViews; Mouse.Click(accordionControlItem, new Point(1, 1)); DXCheckButton bandedViewCheckButton = new UIgridDemoWindow().UIGridPanelControl.UICheckButton; bandedViewCheckButton.Checked = true; DXGrid grid = new UIgridDemoWindow().UIGridPanelControl.UIGridContainerClient.UIGridViewStyleCustom.UIGrid; DXGridBand bandParent = new DXGridBand(grid, grid.Views[0].Name, "gridBand1"); DXGridBand bandChild = new DXGridBand(grid, grid.Views[0].Name, "gridBand2"); Assert.IsTrue(bandChild.ParentBandName == bandParent.BandName); } }
public void ResizeBandViaDraggingRightEdgeInAdvancedBandedGridViewModuleTest() { using (new GridsTestInitializer()) { this.UIMap.SwitchToAlternateViewsDemoModule(); DXGridBand uIGbMainGridBand = UIMap.UITheXtraGridSuitebyDeWindow.UIPanelControl1Client.UIGcContainerClient.UIViewStylesCustom.UIGridControl1Table.UIGbMainGridBand; DXGridBand uIGbPerfomanceGridBand = UIMap.UITheXtraGridSuitebyDeWindow.UIPanelControl1Client.UIGcContainerClient.UIViewStylesCustom.UIGridControl1Table.UIGbPerfomanceGridBand; Size oldSizeGridBandMain = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)uIGbMainGridBand.GetProperty("Size"), typeof(Size).FullName); Size oldSizeGridBandPerformance = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)uIGbPerfomanceGridBand.GetProperty("Size"), typeof(Size).FullName); this.UIMap.ResizeBandViaDraggingRightEdgeOnAdvancedBandedGridView(); Size newSizeGridBandMain = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)uIGbMainGridBand.GetProperty("Size"), typeof(Size).FullName); Size newSizeGridBandPerformance = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)uIGbPerfomanceGridBand.GetProperty("Size"), typeof(Size).FullName); Assert.IsTrue(newSizeGridBandMain.Width < oldSizeGridBandMain.Width && newSizeGridBandPerformance.Width == oldSizeGridBandPerformance.Width); } }
public void ResizeFixedBandTest() { using (new GridsTestInitializer()) { this.UIMap.SwitchToFixedBandsDemoModule(); DXGridBand uIGridBand1GridBand = UIMap.UIXtraGridFeaturesDemoWindow3.UIPanelControl1Client.UIGcContainerClient.UIFixedBandsCustom.UIXtraTabControl1TabList.UIXtraTabPage1Client.UIGridControl1Table.UIGridBand1GridBand; DXColumnHeader uIGrColumnMakerColumnHeader = UIMap.UIXtraGridFeaturesDemoWindow3.UIPanelControl1Client.UIGcContainerClient.UIFixedBandsCustom.UIXtraTabControl1TabList.UIXtraTabPage1Client.UIGridControl1Table.UIGrColumnMakerColumnHeader; Size oldSizeGridBand1 = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)uIGridBand1GridBand.GetProperty("Size"), typeof(Size).FullName); Size oldSizeGrColumn = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)uIGrColumnMakerColumnHeader.GetProperty("Size"), typeof(Size).FullName); this.UIMap.ResizeFixedBand(); Size newSizeGridBand1 = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)uIGridBand1GridBand.GetProperty("Size"), typeof(Size).FullName); Size newSizeGrColumn = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)uIGrColumnMakerColumnHeader.GetProperty("Size"), typeof(Size).FullName); Assert.IsTrue(newSizeGridBand1.Width > oldSizeGridBand1.Width && newSizeGrColumn.Width > oldSizeGrColumn.Width); } }
public void ChangeGridBandWidthTest() { using (new GridsTestInitializer()) { DXTestControl accordionControlItem = new UIgridDemoWindow().UIGridNavigationClient.UIAccordionControl.UIAccordionControlGroupGridViews.UIAccordionControlItemBandedViews; Mouse.Click(accordionControlItem, new Point(1, 1)); DXCheckButton bandedViewCheckButton = new UIgridDemoWindow().UIGridPanelControl.UICheckButton; bandedViewCheckButton.Checked = true; DXGrid grid = new UIgridDemoWindow().UIGridPanelControl.UIGridContainerClient.UIGridViewStyleCustom.UIGrid; DXGridBand bandParent = new DXGridBand(grid, grid.Views[0].Name, "gridBand1"); DXGridBand bandChild = new DXGridBand(grid, grid.Views[0].Name, "gridBand2"); int oldWidthBandParent = bandParent.Width; int oldWidthBandChild = bandChild.Width; bandParent.Width = oldWidthBandParent + 100; bandChild.Width = oldWidthBandChild + 100; int newWidthBandParent = bandParent.Width; int newWidthBandChild = bandChild.Width; Assert.IsTrue(newWidthBandParent > oldWidthBandParent && newWidthBandChild > oldWidthBandChild); } }