The event handler receives an argument of type AfterColPosChangedEventArgs containing data related to this event. The following AfterColPosChangedEventArgs properties provide information specific to this event.
Property | Description |
---|---|
ColumnHeaders | columns (read-only) |
ColumnPosChangedType | column position changed type (read-only) |
The action argument indicates which action occurred to the column or columns: moving, swapping, or sizing.
The columns argument returns a reference to a SelectedCols collection that can be used to retrieve references to the UltraGridColumn object or objects that were moved, swapped, or sized. You can use this reference to access any of the returned collection's properties or methods, as well as the properties or methods of the objects within the collection.
This event is generated after one or more columns are moved, swapped, or sized, either programmatically, or by user interaction. A column can be sized programmatically by setting its Width property and can be moved programmatically by setting its header's VisiblePosition property.
The VisiblePosition property of a column's header can be used to determine the new position of a column that was moved or swapped.
To prevent the user from attempting to move, swap, or size a column, set the AllowColMoving, AllowColSwapping, or AllowColSizing properties, respectively.
The AfterGroupPosChanged event is generated after one or more groups are moved, swapped, or sized.
The BeforeColPosChanged event, which occurs before one or more columns are moved, swapped, or sized, is generated before this event.
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2