Class IncrementalList<T>
The list that implements ISupportIncrementalLoading to load the data for SfDataGrid incrementally.
Inheritance
Implements
Namespace: Syncfusion.SfDataGrid
Assembly: Syncfusion.SfDataGrid.iOS.dll
Syntax
public class IncrementalList<T> : Object, IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable, ISupportIncrementalLoading, INotifyCollectionChanged, IDisposable
Type Parameters
Name | Description |
---|---|
T | The type of data object. |
Constructors
IncrementalList(Action<UInt32, Int32>)
Initializes a new instance of the IncrementalList<T> class.
Declaration
public IncrementalList(Action<uint, int> loadMoreItemsFunc)
Parameters
Type | Name | Description |
---|---|---|
System.Action<System.UInt32, System.Int32> | loadMoreItemsFunc | An action to be executed to load items to the bound collection. |
Properties
Count
Gets the items count of the bound collection.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The items count of the bound collection. |
HasMoreItems
Gets a value indicating whether it supports incremental loading implementations.
Declaration
public bool HasMoreItems { get; }
Property Value
Type | Description |
---|---|
System.Boolean | A sentinel value that supports incremental loading implementations. |
IsReadOnly
Gets a value indicating whether the given source is read only.
Declaration
public bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
System.Boolean | A value indicating whether the given source is read only. |
Item[Int32]
Gets or sets the element at the specified index.
Declaration
public T 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 |
---|---|
T | The element at the specified index. |
MaxItemCount
Gets or sets the maximum items count that the bound collection can have.
Declaration
public int MaxItemCount { get; set; }
Property Value
Type |
---|
System.Int32 |
MaxItemsCount
Gets or sets the maximum items count that the bound collection can have.
Declaration
public int MaxItemsCount { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The maximum items count that the bound collection can have. |
Methods
Add(T)
Adds an object to the End of the bound collection.
Declaration
public void Add(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The object to be added to the End of the bound collection. The value can be null for reference types. |
Clear()
Clears the items in the incremental list.
Declaration
public void Clear()
Contains(T)
Determines whether an element is in the bound collection.
Declaration
public bool Contains(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The object to locate in the bound collection. The value can be null for reference types. |
Returns
Type | Description |
---|---|
System.Boolean | True if item is found in the bound collection, otherwise false. |
CopyTo(T[], Int32)
Method that copies the entire bound collection to a compatible one-dimensional array, starting at the specified index of the target array.
Declaration
public void CopyTo(T[] array, int arrayIndex)
Parameters
Type | Name | Description |
---|---|---|
T[] | array | The one-dimensional System.Array that is the destination of the elements copied from bound collection. The System.Array must have zero-based indexing. |
System.Int32 | arrayIndex | The zero-based index in array at which copying begins. |
Dispose()
Releases the resources used by the component.
Declaration
public void Dispose()
Dispose(Boolean)
Releases the unmanaged resources used by the component and optionally releases the managed resources.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | if true - release both managed and unmanaged resources; if false - release only unmanaged resources. |
GetEnumerator()
Gets the enumerator of the internal list.
Declaration
public IEnumerator<T> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<T> | Returns the enumerator of the internal list. |
IndexOf(T)
Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the bound collection that extends from the specified index to the last element.
Declaration
public int IndexOf(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The object to locate in the bound collection. The value can be null for reference types. |
Returns
Type | Description |
---|---|
System.Int32 | The zero-based index of the first occurrence of item within the range of elements in the bound collection that extends from index to the last element, if found; otherwise, –1. |
Insert(Int32, T)
Inserts an element into the bound collection at the specified index.
Declaration
public void Insert(int index, T item)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index at which item should be inserted. |
T | item | The object to insert. The value can be null for reference types. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | : index is less than 0.-or-index is greater than System.Collections.Generic.List`1.Count" |
LoadItems(IEnumerable<T>)
Adds the data objects incrementally.
Declaration
public void LoadItems(IEnumerable<T> items)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<T> | items | Specifies the collection of data items to be added incrementally. |
LoadMoreItemsAsync(UInt32)
Loads more items asynchronously to the data grid.
Declaration
public void LoadMoreItemsAsync(uint count)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | count | The number of items to be added. |
Remove(T)
Removes the specified item from the collection.
Declaration
public bool Remove(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The item to be removed |
Returns
Type | Description |
---|---|
System.Boolean | A boolean value denoting whether the given item is removed or not. |
RemoveAt(Int32)
Removes the element at the specified index of the bound collection.
Declaration
public void RemoveAt(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index of the element to remove. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | : index is less than 0.-or-index is equal to or greater than bound collection count. |
Events
CollectionChanged
Represents the method that handles the collection changed event.
Declaration
public event NotifyCollectionChangedEventHandler CollectionChanged
Event Type
Type |
---|
System.Collections.Specialized.NotifyCollectionChangedEventHandler |