Skip to main content

TdxSpreadSheetMergedCellList.Count Property

Returns the number of merged cell objects within the collection.

Declaration

property Count: Integer read;

Property Value

Type
Integer

Remarks

Use this property to track the current number of items within the Table View worksheet’s MergedCells collection.

The following code example illustrates how to use the Count property in order to safely access the merged cell collection (the First element in this particular case):

var
  ATableView: TdxSpreadSheetTableView;
  AMergedCell: TdxSpreadSheetMergedCell;
//...
  ATableView := dxSpreadSheet1.ActiveSheetAsTable;
// If there is at least one merged cell within the collection...
  if(ATableView.MergedCells.Count > 0) then
// Accessing the first element...
    AMergedCell := ATableView.MergedCells.First;
See Also