Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TdxSpreadSheetMergedCellList.Count Property

Returns the number of merged cell objects within the collection.

#Declaration

Delphi
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