Consultor Eletrônico



Kbase P184239: Ultragrid row activate generates error message
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   3/28/2011
Status: Unverified

SYMPTOM(s):

Ultragrid row activate generates error message

Lead attributes in a chained-attribute expression (a:b:c) must be type HANDLE or a user-defined type and valid (not UNKNOWN). (10068)

Using a reference to a row similar to the following:
myUltraGrid:Rows:Item[0]:Activate() NO-ERROR.

FACT(s) (Environment):

Windows
OpenEdge 10.2x

CAUSE:

Coding error - the Activate method was called at a time where the grid displays no data.
The UltraGrid only creates rows if there is data to display, so in this case the Rows:Item[0] reference doesn't point to an existing row.

FIX:

Check if the UltraGrid actually has rows to display before trying to activate one.
This can be based on the actual data, or by checing the UltraGrid:Rows:Count / UltraGrid:Rows:VisibleRowCount or similar property on the grid itself