Class IncrementalList<T>
The list that implements ISupportIncrementalLoading to load the data for SfDataGrid incrementally.
Inheritance
Implements
Namespace: Syncfusion.UI.Xaml.Grid
Assembly: Syncfusion.SfGrid.UWP.dll
Syntax
public class IncrementalList<T> : Object, IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable, ISupportIncrementalLoading, INotifyCollectionChanged
Type Parameters
Name | Description |
---|---|
T | The type of data object |
Constructors
IncrementalList(Func<CancellationToken, UInt32, Int32, Task<IList<T>>>)
Initializes a new instance of IncrementalList<T> class.
Declaration
public IncrementalList(Func<CancellationToken, uint, int, Task<IList<T>>> loadeMoreItemsFunc)
Parameters
Type | Name | Description |
---|---|---|
System.Func<System.Threading.CancellationToken, System.UInt32, System.Int32, System.Threading.Tasks.Task<System.Collections.Generic.IList<T>>> | loadeMoreItemsFunc |
Properties
Count
Gets the number of elements contained in the System.Collections.Generic.IList<>.
Declaration
public int Count { get; }
Property Value
Type |
---|
System.Int32 |
HasMoreItems
Gets a sentinel value that supports incremental loading implementations.
Declaration
public bool HasMoreItems { get; }
Property Value
Type |
---|
System.Boolean |
IsReadOnly
Gets a value indicating whether the System.Collections.Generic.IList<> is read only.
Declaration
public bool IsReadOnly { get; }
Property Value
Type |
---|
System.Boolean |
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 specified index. |
Property Value
Type | Description |
---|---|
T | The element at the specified index. |
MaxItemCount
Gets or sets the maximum item count.
Declaration
public int MaxItemCount { get; set; }
Property Value
Type |
---|
System.Int32 |
Methods
Add(T)
Adds an item to the System.Collections.Generic.IList<>.
Declaration
public void Add(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The corresponding item. |
Clear()
Removes all items from the System.Collections.Generic.IList<>.
Declaration
public void Clear()
Contains(T)
Determines whether the System.Collections.Generic.IList<> contains a specific value.
Declaration
public bool Contains(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The specified value. |
Returns
Type | Description |
---|---|
System.Boolean | true if the item is found in the System.Collections.Generic.IList<>; otherwise false. |
CopyTo(T[], Int32)
Copies the elements of System.Collections.Generic.IList<> to an System.Array starting from particular array index.
Declaration
public void CopyTo(T[] array, int arrayIndex)
Parameters
Type | Name | Description |
---|---|---|
T[] | array | The Corresponding array. |
System.Int32 | arrayIndex | The corresponding array index. |
GetEnumerator()
Gets an enumerator that iterates through the collection.
Declaration
public IEnumerator<T> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<T> | An enumerator that iterates through the collection. |
IndexOf(T)
Determines the index of a specific item in the System.Collections.Generic.IList<>.
Declaration
public int IndexOf(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The corresponding item. |
Returns
Type | Description |
---|---|
System.Int32 | The index of item if found in the list;otherwise, -1 |
Insert(Int32, T)
Inserts an item to System.Collections.Generic.IList<> at the specified index.
Declaration
public void Insert(int index, T item)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The corresponding index. |
T | item | The specified item. |
LoadMoreItemsAsync(UInt32)
Initializes incremental loading from the view.
Declaration
public IAsyncOperation<LoadMoreItemsResult> LoadMoreItemsAsync(uint count)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | count | The number of items to load. |
Returns
Type | Description |
---|---|
Windows.Foundation.IAsyncOperation<Windows.UI.Xaml.Data.LoadMoreItemsResult> | The wrapped results of the load operation. |
Remove(T)
Removes the first occurrence of the specified item.
Declaration
public bool Remove(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The specified item. |
Returns
Type | Description |
---|---|
System.Boolean | true if the item is successfully removed; otherwise false. |
RemoveAt(Int32)
Removes the item from System.Collections.Generic.IList<> at the specified index.
Declaration
public void RemoveAt(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The specified index. |
Events
CollectionChanged
Occurs when the collection changes.
Declaration
public event NotifyCollectionChangedEventHandler CollectionChanged
Event Type
Type |
---|
System.Collections.Specialized.NotifyCollectionChangedEventHandler |