Get a specific UltraGridCell from an UltraGridRow object

Posted by PeterWokke on 21-Jan-2015 03:48

In a DeleteRow method I want the value from selected cell out off an UltraGridRow object.

In this example it gets the cell by its array number.

I prefer to get a specific cell based on the cell key name.

Who can help me how to do this?

method private integer DeletRow (input pcBufferName as character, input phQuery as handle, input pclsCurrentRow as UltraGridRow):

define variable iResult as integer no-undo.
define variable clsCells as CellsCollection no-undo.
define variable clsCell as UltraGridCell no-undo.
define variable iKey   t as integer no-undo.

clsCells = pclsCurrentRow:Cells.
clsCell = clsCells[0].

iKey = integer(clsCell:text).

return iResult.
end method.

All Replies

Posted by Roger Blanchard on 21-Jan-2015 07:01

Why can't you just pass the key instead of the index? So, instead of clsCell[0] you would use clsCell['keyname'].

PUBLIC PROPERTY Item AS Infragistics.Win.UltraWinGrid.UltraGridCell [key AS character]


Member of Infragistics.Win.UltraWinGrid.CellsCollection


indexer (by string key)


This is an indexed property.

This thread is closed