Class DataGridSelectedCellCollection
Represents a collection of SelectedCellsInfo, that represent the selected cells in a SfDataGrid control. This class cannot be inherited.
Implements
Inherited Members
Namespace: Syncfusion.Maui.DataGrid
Assembly: Syncfusion.Maui.DataGrid.dll
Syntax
public class DataGridSelectedCellCollection : IList<SelectedCellsInfo>, ICollection<SelectedCellsInfo>, IEnumerable<SelectedCellsInfo>, IEnumerable
Constructors
DataGridSelectedCellCollection()
Initializes a new instance of the DataGridSelectedCellCollection class.
Declaration
public DataGridSelectedCellCollection()
Properties
Count
Gets the number of cells info contained in the DataGridSelectedCellCollection list.
Declaration
public int Count { get; }
Property Value
| Type |
|---|
| int |
IsReadOnly
Gets a value indicating whether the DataGridSelectedCellCollection list is read only.
Declaration
public bool IsReadOnly { get; }
Property Value
| Type | Description |
|---|---|
| bool | True if the DataGridSelectedCellCollection list is read only; otherwise, false. |
this[int]
Gets or sets the selected cells information at the specified index.
Declaration
public SelectedCellsInfo this[int index] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| int | index |
Property Value
| Type |
|---|
| SelectedCellsInfo |
Methods
Add(SelectedCellInfo)
Adds the specific cell info into the DataGridSelectedCellCollection list.
Declaration
public void Add(SelectedCellInfo cellInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| SelectedCellInfo | cellInfo |
Add(SelectedCellsInfo)
Adds the specific cells info into the DataGridSelectedCellCollection list.
Declaration
public void Add(SelectedCellsInfo cellsInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| SelectedCellsInfo | cellsInfo |
Clear()
Removes all elements from the DataGridSelectedCellCollection list.
Declaration
public void Clear()
Contains(SelectedCellInfo)
Determines whether the specific cell info is in the DataGridSelectedCellCollection list.
Declaration
public bool Contains(SelectedCellInfo cellInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| SelectedCellInfo | cellInfo |
Returns
| Type |
|---|
| bool |
Contains(SelectedCellsInfo)
Determines whether the specific cells info contains in the DataGridSelectedCellCollection list.
Declaration
public bool Contains(SelectedCellsInfo cellsInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| SelectedCellsInfo | cellsInfo |
Returns
| Type |
|---|
| bool |
CopyTo(SelectedCellsInfo[], int)
Copies all the cells information to the specified destination array index.
Declaration
public void CopyTo(SelectedCellsInfo[] array, int arrayIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| SelectedCellsInfo[] | array | |
| int | arrayIndex |
GetEnumerator()
Gets an enumerator that iterates through the DataGridSelectedCellCollection list.
Declaration
public IEnumerator<SelectedCellsInfo> GetEnumerator()
Returns
| Type |
|---|
| IEnumerator<SelectedCellsInfo> |
IndexOf(SelectedCellsInfo)
Searches for the specified selected cells info and returns zero-based index of the first occurrence with in the DataGridSelectedCellCollection.
Declaration
public int IndexOf(SelectedCellsInfo item)
Parameters
| Type | Name | Description |
|---|---|---|
| SelectedCellsInfo | item |
Returns
| Type |
|---|
| int |
Insert(int, SelectedCellInfo)
Inserts a specified cell info into the DataGridSelectedCellCollection at the specified index.
Declaration
public void Insert(int index, SelectedCellInfo cellInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | |
| SelectedCellInfo | cellInfo |
Insert(int, SelectedCellsInfo)
Insert a specified cells info into the DataGridSelectedCellCollection at the specified index.
Declaration
public void Insert(int index, SelectedCellsInfo newItem)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | |
| SelectedCellsInfo | newItem |
Remove(SelectedCellInfo)
Removes the first occurrence of a specific cell info from the DataGridSelectedCellCollection list.
Declaration
public bool Remove(SelectedCellInfo cellInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| SelectedCellInfo | cellInfo |
Returns
| Type |
|---|
| bool |
Remove(SelectedCellsInfo)
Removes the first occurrence of a specific cells info from the DataGridSelectedCellCollection list.
Declaration
public bool Remove(SelectedCellsInfo cellsInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| SelectedCellsInfo | cellsInfo |
Returns
| Type |
|---|
| bool |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException |
RemoveAt(int)
Removes the cells info at specified index of the DataGridSelectedCellCollection.
Declaration
public void RemoveAt(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index |