Table of Contents

Method SafeCell

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

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

column ListControlColumn

The 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

columnId ObjectUniqueId

The unique identifier of the column.

Returns

ListControlItem

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

cellIndex int

The zero-based index of the cell to retrieve.

Returns

ListControlItem

The cell at the specified index if it exists; otherwise, null.