Class SelectedRecordsCollection
Inheritance
Implements
Namespace: Syncfusion.Grouping
Assembly: Syncfusion.Grouping.Base.dll
Syntax
public class SelectedRecordsCollection : Object, IList, ICollection, IEnumerable, IDisposable
Properties
Count
Gets the number of elements contained in the collection. The property also ensures that the collection is in sync with the underlying table if changes have been made to the table or the TableDescriptor.
Declaration
public int Count { get; }
Property Value
| Type |
|---|
| System.Int32 |
Remarks
The method calls EnsureInitialized(Object, Boolean).
IsFixedSize
Returns False since this collection has no fixed size.
Declaration
public bool IsFixedSize { get; }
Property Value
| Type |
|---|
| System.Boolean |
IsReadOnly
Returns False since this collection is not read only.
Declaration
public bool IsReadOnly { get; }
Property Value
| Type |
|---|
| System.Boolean |
IsSynchronized
Returns False.
Declaration
public bool IsSynchronized { get; }
Property Value
| Type |
|---|
| System.Boolean |
Item[Int32]
Gets or the element at the zero-based index. Setting is not supported and will throw an exception since the collection is Read-only.
Declaration
public SelectedRecord this[int index] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | index |
Property Value
| Type |
|---|
| SelectedRecord |
Remarks
The method ensures that the collection is in sync with the underlying table if changes have been made to the table or the TableDescriptor.
The method calls EnsureInitialized(Object, Boolean).
Methods
Add(Record)
Adds a record to the collection of selected records and marks it as selected.
Declaration
public int Add(Record value)
Parameters
| Type | Name | Description |
|---|---|---|
| Record | value | Record to add. |
Returns
| Type | Description |
|---|---|
| System.Int32 | Index at which the record is added. |
Add(SelectedRecord)
Adds a record to the collection of selected records and marks it as selected.
Declaration
public int Add(SelectedRecord value)
Parameters
| Type | Name | Description |
|---|---|---|
| SelectedRecord | value | A SelectedRecord to add. |
Returns
| Type | Description |
|---|---|
| System.Int32 | Index at which the record is added. |
AddRange(Record[])
Adds the collection of records to the Selected records collection and marks them as selected.
Declaration
public int[] AddRange(Record[] records)
Parameters
| Type | Name | Description |
|---|---|---|
| Record[] | records | The records ton be added in the collection. |
Returns
| Type | Description |
|---|---|
| System.Int32[] | The starting index of the added records. |
AddRange(RecordsInTableCollection)
Adds the collection of records to the Selected records collection and marks them as selected.
Declaration
public int[] AddRange(RecordsInTableCollection records)
Parameters
| Type | Name | Description |
|---|---|---|
| RecordsInTableCollection | records | The records to be added to the collecyion. |
Returns
| Type | Description |
|---|---|
| System.Int32[] | The starting index of the added records. |
Clear()
Removes all records from the collection of selected records and marks them as deselected.
Declaration
public void Clear()
Contains(Record)
Determines if the element belongs to this collection.
Declaration
public bool Contains(Record record)
Parameters
| Type | Name | Description |
|---|---|---|
| Record | record | The Object to locate in the collection. The value can be a NULL reference (Nothing in Visual Basic). |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if item is found in the collection; otherwise, False. |
Contains(SelectedRecord)
Determines if the element belongs to this collection.
Declaration
public bool Contains(SelectedRecord value)
Parameters
| Type | Name | Description |
|---|---|---|
| SelectedRecord | value | The Object to locate in the collection. The value can be a NULL reference (Nothing in Visual Basic). |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if item is found in the collection; otherwise, False. |
CopyTo(Record[], Int32)
Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array.
Declaration
public void CopyTo(Record[] array, int index)
Parameters
| Type | Name | Description |
|---|---|---|
| Record[] | array | The one-dimensional array that is the destination of the elements copied from ArrayList. The array must have zero-based indexing. |
| System.Int32 | index | The zero-based index in array at which copying begins. |
CopyTo(SelectedRecord[], Int32)
Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array.
Declaration
public void CopyTo(SelectedRecord[] array, int index)
Parameters
| Type | Name | Description |
|---|---|---|
| SelectedRecord[] | array | The one-dimensional array that is the destination of the elements copied from ArrayList. The array must have zero-based indexing. |
| System.Int32 | index | The zero-based index in array at which copying begins. |
DeleteAll()
Deletes all the selected records.
Declaration
public void DeleteAll()
Dispose()
Disposes of the object and releases internal objects.
Declaration
public void Dispose()
FindRecord(Record)
Searches for the occurrence of a record and returns the zero-based index of the occurrence found or -1 if not found.
Declaration
public int FindRecord(Record record)
Parameters
| Type | Name | Description |
|---|---|---|
| Record | record | The record to search for. |
Returns
| Type | Description |
|---|---|
| System.Int32 | Record index. |
FindRecord(Int32)
Searches for the occurrence of a record and returns the zero-based index of the occurrence found or -1 if not found.
Declaration
public int FindRecord(int sourceIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | sourceIndex | The position of the record in the underlying data source (UnsortedRecords.IndexOf). |
Returns
| Type | Description |
|---|---|
| System.Int32 | Record index. |
GetEnumerator()
Returns an enumerator for the entire collection.
Declaration
public SelectedRecordsCollectionEnumerator GetEnumerator()
Returns
| Type | Description |
|---|---|
| SelectedRecordsCollectionEnumerator | An Enumerator for the entire collection. |
Remarks
Enumerators only allow reading the data in the collection. Enumerators cannot be used to modify the underlying collection.
IndexOf(Record)
Returns the zero-based index of the occurrence of the element in the collection.
Declaration
public int IndexOf(Record value)
Parameters
| Type | Name | Description |
|---|---|---|
| Record | value | The element to locate in the collection. The value can be a NULL reference (Nothing in Visual Basic). |
Returns
| Type | Description |
|---|---|
| System.Int32 | The zero-based index of the occurrence of the element within the entire collection, if found; otherwise, -1. |
IndexOf(SelectedRecord)
Returns the zero-based index of the occurrence of the element in the collection.
Declaration
public int IndexOf(SelectedRecord value)
Parameters
| Type | Name | Description |
|---|---|---|
| SelectedRecord | value | The element to locate in the collection. The value can be a NULL reference (Nothing in Visual Basic). |
Returns
| Type | Description |
|---|---|
| System.Int32 | The zero-based index of the occurrence of the element within the entire collection, if found; otherwise, -1. |
Remove(Record)
Removes a record from the collection of selected records and marks it as deselected.
Declaration
public void Remove(Record value)
Parameters
| Type | Name | Description |
|---|---|---|
| Record | value | Record to remove. |
Remove(SelectedRecord)
Removes a record the collection of selected records and marks it as deselected.
Declaration
public void Remove(SelectedRecord value)
Parameters
| Type | Name | Description |
|---|---|---|
| SelectedRecord | value | Record to remove. |
RemoveAt(Int32)
Not supported because collection is Read-only.
Declaration
public void RemoveAt(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | index | Index of the record to be removed. |
RemoveRange(Record[])
Removes the collection of records from Selected records collection and marks them as deselected.
Declaration
public void RemoveRange(Record[] records)
Parameters
| Type | Name | Description |
|---|---|---|
| Record[] | records | The records to be removed. |
RemoveRange(RecordsInTableCollection)
Removes the collection of records from Selected records collection and marks them as deselected.
Declaration
public void RemoveRange(RecordsInTableCollection records)
Parameters
| Type | Name | Description |
|---|---|---|
| RecordsInTableCollection | records | The records to be removed. |
RemoveRange(SelectedRecord[])
Removes the collection of selected records and marks them as deselected.
Declaration
public void RemoveRange(SelectedRecord[] records)
Parameters
| Type | Name | Description |
|---|---|---|
| SelectedRecord[] | records |
RemoveRange(SelectedRecordsCollection)
Removes the collection of selected records and marks them as deselected.
Declaration
public void RemoveRange(SelectedRecordsCollection records)
Parameters
| Type | Name | Description |
|---|---|---|
| SelectedRecordsCollection | records |