Consultor Eletrônico



Kbase P176017: How to get the handle to the affected column in the AfterColPosChanged event of the UltraGrid
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   25/10/2010
Status: Unverified

GOAL:

How to get the handle to the affected column in the AfterColPosChanged event of the UltraGrid

GOAL:

How to get the column from the AfterColPosChangeEventArgs event parameter object

FACT(s) (Environment):

Windows
OpenEdge 10.2x

FIX:

The ColumnHeaders property is a .NET array and, as such, it cannot be referenced in the ABL in the same way that one would normally access an array subscript (i.e. with square brackets). To access an element of a .NET array one must use the GetValue and SetValue methods, as follows:

/* e is Infragistics.Win.UltraWinGrid.AfterColPosChangedEventArgs ? a parameter to the event */

DEFINE VARIABLE oCol AS Infragistics.Win.UltraWinGrid.UltraGridColumn NO-UNDO.
DEFINE VARIABLE colHdr AS Infragistics.Win.UltraWinGrid.ColumnHeader NO-UNDO.

colHdr = CAST(e:ColumnHeaders:GetValue(0), Infragistics.Win.UltraWinGrid.ColumnHeader).
oCol = colHdr:Column.