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.
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]
GET.
Member of Infragistics.Win.UltraWinGrid.CellsCollection
Summary:
indexer (by string key)
Note:
This is an indexed property.