Class SelectedCellsCollection
Represents the class that maintains the collection of SelectedCellsInfo.
Inheritance
Namespace: Syncfusion.WinForms.DataGrid.Interactivity
Assembly: Syncfusion.SfDataGrid.WinForms.dll
Syntax
public class SelectedCellsCollection : ObservableCollection<SelectedCellsInfo>
Constructors
SelectedCellsCollection()
Initializes a new instance of the SelectedCellsCollection class.
Declaration
public SelectedCellsCollection()
Properties
Count
Gets the count of the selected cells.
Declaration
public int Count { get; }
Property Value
Type |
---|
System.Int32 |
Item[Int32]
Gets or sets the SelectedCellsInfo at the specified index.
Declaration
public SelectedCellsInfo this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index of the element to get or set. |
Property Value
Type | Description |
---|---|
SelectedCellsInfo | Returns the SelectedCellsInfo at the specified index. |
SelectedCells
Gets or sets the collection of SelectedCellsInfo.
Declaration
public ObservableCollection<SelectedCellsInfo> SelectedCells { get; set; }
Property Value
Type |
---|
System.Collections.ObjectModel.ObservableCollection<SelectedCellsInfo> |
Methods
Add(SelectedCellInfo)
Adds the given cell to the selected cells collection.
Declaration
public void Add(SelectedCellInfo cellInfo)
Parameters
Type | Name | Description |
---|---|---|
SelectedCellInfo | cellInfo | The cell information. |
Add(SelectedCellsInfo)
Adds the cells in the SelectedCellsInfo to the selected cells collection.
Declaration
public void Add(SelectedCellsInfo cellsInfo)
Parameters
Type | Name | Description |
---|---|---|
SelectedCellsInfo | cellsInfo | The selected cells info. |
Clear()
Clears the selected cells collection.
Declaration
public void Clear()
Contains(SelectedCellInfo)
Checks whether the given cell information exists in selected cell collection.
Declaration
public bool Contains(SelectedCellInfo cellInfo)
Parameters
Type | Name | Description |
---|---|---|
SelectedCellInfo | cellInfo | The cell information. |
Returns
Type | Description |
---|---|
System.Boolean | returns true, if found. Otherwise false. |
Remove(SelectedCellInfo)
Removes the cell from the collection.
Declaration
public bool Remove(SelectedCellInfo cellInfo)
Parameters
Type | Name | Description |
---|---|---|
SelectedCellInfo | cellInfo | The cell information. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true, if removed. Otherwise false. |
Remove(SelectedCellsInfo)
Removes the cell from the collection.
Declaration
public bool Remove(SelectedCellsInfo cellsInfo)
Parameters
Type | Name | Description |
---|---|---|
SelectedCellsInfo | cellsInfo | The cells in a selected row. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true, if removed. Otherwise false. |
RemoveAt(Int32)
Removes the selected cells at the specified index.
Declaration
public void RemoveAt(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index of the element to be removed. |