Method SafeCell
SafeCell(ListControlColumn)
Retrieves the cell associated with the specified column in the current row, ensuring that a valid cell is always returned.
public virtual ListControlItem SafeCell(ListControlColumn column)
Parameters
columnListControlColumnThe column for which to retrieve the corresponding cell. Cannot be null.
Returns
- ListControlItem
A ListControlItem representing the cell for the specified column. If the cell does not exist, a default or placeholder cell is returned.
SafeCell(ObjectUniqueId)
Gets the cell for the specified column identifier. If the cell does not exist, it is created and added to the Cells collection.
public virtual ListControlItem SafeCell(ObjectUniqueId columnId)
Parameters
columnIdObjectUniqueIdThe unique identifier of the column.
Returns
SafeCell(int)
Retrieves the cell at the specified index if it exists; otherwise, returns null. It is safe method which does not throw exceptions.
public ListControlItem? SafeCell(int cellIndex)
Parameters
cellIndexintThe zero-based index of the cell to retrieve.
Returns
- ListControlItem
The cell at the specified index if it exists; otherwise, null.