public void MakeColumnFixedRightTest() { using (new TreeListTestInitializer("treeListMainDemo")) { this.UIVerticalGridTreeListMap.SwitchToFixedColumnsDemoModule(); DXTreeListColumnHeader uICategoryTreeListColumnHeader = UIVerticalGridTreeListMap.UIXtraTreeListFeaturesWindow3.UIPanelControl1Client.UIGcContainerClient.UIFixedColumnsCustom.UITreeList1TreeList.UICategoryTreeListColumnHeader; this.UIVerticalGridTreeListMap.MakeColumnFixedRight(); Assert.IsTrue(uICategoryTreeListColumnHeader.Fixed == FixedStyle.Right); Assert.IsTrue(IsTreeListColumnFixed(uICategoryTreeListColumnHeader)); } }
public void MakeFixedColumnNotFixedTest() { using (new TreeListTestInitializer("treeListMainDemo")) { this.UIVerticalGridTreeListMap.SwitchToFixedColumnsDemoModule(); this.UIVerticalGridTreeListMap.MakeFixedColumnNotFixed(); DXTreeListColumnHeader commonNameTreeListColumnHeader = UIVerticalGridTreeListMap.UIXtraTreeListFeaturesWindow3.UIPanelControl1Client.UIGcContainerClient.UIFixedColumnsCustom.UITreeList1TreeList. UICommonNameTreeListColumnHeader; Assert.IsTrue(commonNameTreeListColumnHeader.Fixed == FixedStyle.None); Assert.IsFalse(IsTreeListColumnFixed(commonNameTreeListColumnHeader)); } }
public bool IsTreeListColumnFixed(DXTreeListColumnHeader column) { column.TreeList.LeftCoord = 0; column.MakeVisible(); if (column.TreeList.LeftCoord != 0) { return(false); } column.TreeList.LeftCoord = 100500; int oldLeftCoord = column.TreeList.LeftCoord; column.MakeVisible(); return(column.TreeList.LeftCoord == oldLeftCoord); }