Class CollectionViewAdv
The class that maintains the collection view of the SfDataGrid and provides functionalities of current record management, custom sorting, filtering, and grouping.
Implements
Namespace: Syncfusion.Maui.Data
Assembly: Syncfusion.Maui.Data.dll
Syntax
public class CollectionViewAdv : Object, ICollectionViewAdv, IEnumerable, INotifyPropertyChanged, ISupportInitialize, ISupportIncrementalLoading, IDisposable, IPropertyChangedEventHandler, IEditableCollectionView, INotifyCollectionChanged, IUnboundExpressionFunc, IGridViewNotifier
Constructors
CollectionViewAdv(IEnumerable)
Initializes a new instance of the CollectionViewAdv class.
Declaration
public CollectionViewAdv(IEnumerable _source)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEnumerable | _source | The IEnumerable source of the collection view. |
CollectionViewAdv(IEnumerable, Type)
Initializes a new instance of the CollectionViewAdv class.
Declaration
public CollectionViewAdv(IEnumerable _source, Type sourceType)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEnumerable | _source | The IEnumerable source of the collection view. |
System.Type | sourceType | The source type. |
Fields
currentItem
Gets the current item of the collection view.
Declaration
protected object currentItem
Field Value
Type |
---|
System.Object |
currentPosition
Gets the position of the current item in the collection vew.
Declaration
protected int currentPosition
Field Value
Type |
---|
System.Int32 |
editItem
Gets the current edit item of the collection view.
Declaration
protected object editItem
Field Value
Type |
---|
System.Object |
IsDisposed
Gets or sets a value indicating whether the view has been disposed of.
Declaration
protected bool IsDisposed
Field Value
Type |
---|
System.Boolean |
IsInCommitEdit
Gets or sets a value indicating whether the view is in commit edit.
Declaration
protected bool IsInCommitEdit
Field Value
Type |
---|
System.Boolean |
IsInCommitNew
Indicates whether the new item is committed in the collection view.
Declaration
protected bool IsInCommitNew
Field Value
Type |
---|
System.Boolean |
IsInEndDeferral
Gets the value indicating whether the collection view is in end deferal, which denotes whether the refreshing in the collection view is end.
Declaration
protected bool IsInEndDeferral
Field Value
Type |
---|
System.Boolean |
IsInGroup
Gets a value indicating whether the data in the underlying collection view is grouped.
Declaration
protected bool IsInGroup
Field Value
Type |
---|
System.Boolean |
IsInPropertyChange
Gets a value indicating whether the property change is in progress.
Declaration
protected bool IsInPropertyChange
Field Value
Type |
---|
System.Boolean |
IsInSourceCollectionChange
Gets or sets a boolean value indicating whether the collection change is currently in progress.
Declaration
protected bool IsInSourceCollectionChange
Field Value
Type |
---|
System.Boolean |
IsInSuspend
Gets the value indicating whether view is suspended from updates.
Declaration
protected bool IsInSuspend
Field Value
Type |
---|
System.Boolean |
IsIQueryable
Gets or Sets the IsIQueryable.
Declaration
protected bool IsIQueryable
Field Value
Type |
---|
System.Boolean |
Remarks
if True records creation and data operation handled by query. otherwise handled by enumeration.
IsItemPropertiesTypeSet
Gets a boolean value indicating whether type of item properties is set.
Declaration
protected bool IsItemPropertiesTypeSet
Field Value
Type |
---|
System.Boolean |
ItemPropertiesSet
Gets a boolean value indicating whether item properties is set.
Declaration
protected bool ItemPropertiesSet
Field Value
Type |
---|
System.Boolean |
KeyValue
Gets or Sets the KeyValue.
Declaration
protected string KeyValue
Field Value
Type |
---|
System.String |
Remarks
Entity query needs to be sorted when we use Skip. Query will be sorted if the KeyValue is not null or empty
propertyAccessProvider
Gets the ItemPropertiesProvider which handles the reflection for CollectionViewAdv.
Declaration
protected ItemPropertiesProvider propertyAccessProvider
Field Value
Type |
---|
ItemPropertiesProvider |
Properties
AutoExpandGroups
Gets or sets a value that indicates whether the group caption is expanded automatically during grouping.
Declaration
public bool AutoExpandGroups { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | True if the group caption is expanded automatically, otherwise false. |
CanAddNew
Gets a value that indicates whether a new item can be added to the collection.
Declaration
public virtual bool CanAddNew { get; }
Property Value
Type | Description |
---|---|
System.Boolean | True if a new item can be added to the collection, otherwisefalse. |
CanCancelEdit
Gets a value that indicates whether the collection view can discard pending changes and restore the original values of an edited object.
Declaration
public bool CanCancelEdit { get; }
Property Value
Type |
---|
System.Boolean |
CanFilter
Gets a boolean value indicating whether filtering can be performed in the view.
Declaration
public bool CanFilter { get; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value indicating whether filtering can be performed in the view. |
CanGroup
Gets a boolean value indicating whether grouping can be performed in the view.
Declaration
public bool CanGroup { get; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value indicating whether grouping can be performed in the view. |
CanListenNotifiers
Gets a boolean value indicating whether the view can listen to the notifiers.
Declaration
public bool CanListenNotifiers { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value indicating whether the view can listen to the notifiers. |
CanRemove
Gets a value that indicates whether an item can be removed from the collection.
Declaration
public bool CanRemove { get; }
Property Value
Type | Description |
---|---|
System.Boolean | True if an item can be removed from the collection, otherwise false. |
CanSort
Gets a boolean value indicating whether sorting can be performed in the view.
Declaration
public bool CanSort { get; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value indicating whether sorting can be performed in the view. |
CaptionSummaryRow
Gets or sets the ISummaryRow which maintains the group caption summary information of the collection view.
Declaration
public ISummaryRow CaptionSummaryRow { get; set; }
Property Value
Type | Description |
---|---|
ISummaryRow | The ISummaryRow which maintains the group caption summary information of the collection view. |
Count
Gets the number of records in the view.
Declaration
public virtual int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The number of records in the view. |
Culture
Gets or sets the System.Globalization.CultureInfo of the collection view.
Declaration
public CultureInfo Culture { get; set; }
Property Value
Type | Description |
---|---|
System.Globalization.CultureInfo | The System.Globalization.CultureInfo of the collection view. |
CurrentAddItem
Gets the item that is being added during the current add transaction.
Declaration
public object CurrentAddItem { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The item that is being added if IsAddingNew is true, otherwise null. |
CurrentEditItem
Gets the item in the collection that is being edited.
Declaration
public object CurrentEditItem { get; }
Property Value
Type | Description |
---|---|
System.Object | The item in the collection that is being edited if IsEditingItem is true, otherwise null. |
CurrentItem
Gets the current item in the view.
Declaration
public object CurrentItem { get; }
Property Value
Type | Description |
---|---|
System.Object | The current item in the view. |
CurrentPosition
Gets the ordinal position of the CurrentItem within the (optionally sorted and filtered) view.
Declaration
public int CurrentPosition { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The ordinal position of the CurrentItem within the (optionally sorted and filtered) view. |
EnableSummaryOptimization
Gets or sets a boolean value that indicates whether to enable optimistic summary calculation on real time updates.
Declaration
public virtual bool EnableSummaryOptimization { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value that indicates whether to enable optimistic summary calculation on real time updates. |
Remarks
The EnableSummaryOptimization calculates the summary optimistically when the data objects implement the INotifyPropertyChanging and System.ComponentModel.INotifyPropertyChanged.
FetchSize
Gets or sets the value that indicates the number of records to be fetched.
Declaration
public int FetchSize { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The value that indicates the number of records to be fetched.The default value is 50. |
Remarks
In CustomDataVirtualization, creates records based on default fetchsize value when source list is set as null
Filter
Gets or sets the predicate to apply custom filter on source.
Declaration
public Predicate<object> Filter { get; set; }
Property Value
Type | Description |
---|---|
System.Predicate<System.Object> | The predicate to apply custom filter on source. |
FilterPredicates
Gets or sets the collection of IFilterDefinition to maintain the filtering information.
Declaration
public virtual ObservableCollection<IFilterDefinition> FilterPredicates { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ObservableCollection<IFilterDefinition> | The collection of IFilterDefinition to maintain the filtering information. |
GroupComparer
Gets or sets the group comparer, which contains the logic to be applied for grouping the data based on the custom logic.
Declaration
public IComparer<Group> GroupComparer { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IComparer<Group> | The group comparer, which contains the logic to be applied for grouping the data based on the custom logic. |
GroupDescriptions
Gets the collection of group descriptions, that contains the columns that represent grouping in the collection view.
Declaration
public ObservableCollection<ColumnGroupDescription> GroupDescriptions { get; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ObservableCollection<ColumnGroupDescription> | The collection of group descriptions, that contains the columns that represent grouping in the collection view. |
GroupList
Gets the TopLevelGroup as IGroupList to handle the add/remove operations.
Declaration
public IGroupList GroupList { get; }
Property Value
Type | Description |
---|---|
IGroupList | The TopLevelGroup as IGroupList to handle the add/remove operations. |
Groups
Gets the read only observable collection of the groups.
Declaration
public ReadOnlyObservableCollection<object> Groups { get; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ReadOnlyObservableCollection<System.Object> | The read only observable collection of the groups. |
HasMoreItems
Gets a boolean value indicating whether there is more items to load.
Declaration
public bool HasMoreItems { get; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value indicating whether there is more items to load. |
IsAddingNew
Gets a value that indicates whether an add transaction is in progress.
Declaration
public bool IsAddingNew { get; }
Property Value
Type | Description |
---|---|
System.Boolean | True if an add transaction is in progress, otherwise false. |
IsCurrentAfterLast
Gets a boolean value indicating whether the CurrentItem is beyond the end (End-Of-File).
Declaration
public bool IsCurrentAfterLast { get; }
Property Value
Type | Description |
---|---|
System.Boolean | Returns true if CurrentItem is beyond the end (End-Of-File). |
IsCurrentBeforeFirst
Gets a boolean value indicating whether the CurrentItem is before the beginning (Beginning-Of-File).
Declaration
public bool IsCurrentBeforeFirst { get; }
Property Value
Type | Description |
---|---|
System.Boolean | Returns true if CurrentItem is before the beginning (Beginning-Of-File). |
IsDynamicBound
Gets or sets the value that indicates whether the data object is System.Dynamic.
Declaration
public bool IsDynamicBound { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | True if the data object is dynamic, otherwise false. |
IsEditingItem
Gets a value that indicates whether an edit transaction is in progress.
Declaration
public bool IsEditingItem { get; }
Property Value
Type | Description |
---|---|
System.Boolean | True if an edit transaction is in progress, otherwise false. |
IsEmpty
Gets a boolean value indicating whether the collection view is empty.
Declaration
public bool IsEmpty { get; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value indicating whether the collection view is empty. |
IsGrouping
Gets a boolean value that indicates whether the source have grouped.
Declaration
public bool IsGrouping { get; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value that indicates whether the source have grouped. |
IsInDeferRefresh
Gets a value that indicates whether the DeferRefresh(Boolean) in action.
Declaration
public bool IsInDeferRefresh { get; }
Property Value
Type | Description |
---|---|
System.Boolean | True if the DeferRefresh(Boolean) in action, otherwise false. |
IsLegacyDataTable
Gets a value that indicates whether the underlying data object is System.Data.DataTable.
Declaration
public bool IsLegacyDataTable { get; }
Property Value
Type | Description |
---|---|
System.Boolean | True if the underlying data object is DataTable, otherwise false. |
IsReadOnly
Gets a boolean value indicating whether the view can only be read.
Declaration
public bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value indicating whether the view can only be read. |
IsXElementBound
Gets the value that indicates whether the data object is System.Xml.Linq.XElement.
Declaration
public bool IsXElementBound { get; }
Property Value
Type | Description |
---|---|
System.Boolean | True if the data object is XElement, otherwise false. |
Item[Int32]
Gets the record at the given index.
Declaration
public object this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The record at the given index. |
Property Value
Type | Description |
---|---|
System.Object | The record at the given index. |
ItemProperties
Gets the collection of item properties, that contains the property and its information.
Declaration
public PropertyDescriptorCollection ItemProperties { get; }
Property Value
Type | Description |
---|---|
System.ComponentModel.PropertyDescriptorCollection | The collection of item properties, that contains the property and its information. |
LiveDataUpdateMode
Gets or sets the LiveDataUpdateMode to control data manipulation operations during data updates.
Declaration
public LiveDataUpdateMode LiveDataUpdateMode { get; set; }
Property Value
Type | Description |
---|---|
LiveDataUpdateMode | One of the LiveDataUpdateMode that indicates how data manipulation operations are handled during data updates. The default value is Default. |
NewItemPlaceholderPosition
Gets or sets the position of the new item placeholder in the collection view.
Declaration
public NewItemPlaceholderPosition NewItemPlaceholderPosition { get; set; }
Property Value
Type | Description |
---|---|
NewItemPlaceholderPosition | One of the enumeration values of NewItemPlaceholderPosition that specifies the position of the new item placeholder in the collection view. |
NotificationSubscriptionMode
Gets or sets a value that indicate whether source collection items can listen the NotifyPropertyChanging/Changed events.
Declaration
public NotificationSubscriptionMode NotificationSubscriptionMode { get; set; }
Property Value
Type | Description |
---|---|
NotificationSubscriptionMode | The NotificationSubscriptionMode representing a value that indicate whether source collection items can listen the NotifyPropertyChanging/Changed events. |
Records
Gets the records collection of the collection view, which includes the records displayed in the view.
Declaration
public RecordsList Records { get; }
Property Value
Type | Description |
---|---|
RecordsList | The IRecordsList of records which includes the records displayed in the view. |
Remarks
When the ColumnGroupDescription are added, the groups are maintained in DisplayElements.
SortComparers
Gets the SortComparers to sort the data using custom logic.
Declaration
public SortComparers SortComparers { get; }
Property Value
Type | Description |
---|---|
SortComparers | The SortComparers which contains the custom logic for sorting. |
SortDescriptions
Gets the collection of sort descriptions, that contains the columns that represent sorting in the collection view.
Declaration
public SortDescriptionCollection SortDescriptions { get; }
Property Value
Type | Description |
---|---|
SortDescriptionCollection | The collection of sort descriptions, that contains the columns that represent sorting in the collection view. |
SourceCollection
Gets the IEnumerable source collection of the collection view.
Declaration
public IEnumerable SourceCollection { get; }
Property Value
Type | Description |
---|---|
System.Collections.IEnumerable | The IEnumerable source collection of the collection view. |
SourceType
Gets the value that indicates the source type of bound source.
Declaration
public Type SourceType { get; }
Property Value
Type | Description |
---|---|
System.Type | The value that indicates the source type of bound source. |
SummaryCalculationMode
Gets or sets a value that denotes the mode of calculation for caption and group summaries for improved performance.
Declaration
public CalculationMode SummaryCalculationMode { get; set; }
Property Value
Type | Description |
---|---|
CalculationMode | One of the CalculationMode that indicates when to perform the summary calculation. The default value is Default. |
SummaryRows
Gets the collection of ISummaryRow which maintains the summary rows information of the collection view.
Declaration
public ObservableCollection<ISummaryRow> SummaryRows { get; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ObservableCollection<ISummaryRow> | The collection of ISummaryRow which maintains the summary rows information of the collection view. |
TableSummaryRows
Gets the collection of ISummaryRow which maintains the table summary rows information.
Declaration
public ObservableCollection<ISummaryRow> TableSummaryRows { get; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ObservableCollection<ISummaryRow> | The collection of ISummaryRow which maintains table summary rows information. |
TopLevelGroup
Gets the TopLevelGroup of the collection view, which maintains the group information when the ColumnGroupDescription is added into GroupDescriptions collection. Top-level group will be the first-level group. All groups will have the root group which is the top-level group.
Declaration
public TopLevelGroup TopLevelGroup { get; }
Property Value
Type | Description |
---|---|
TopLevelGroup | The TopLevelGroup which maintains the group information of the collection view, which maintains the group information when the ColumnGroupDescription is added into GroupDescriptions collection. |
Methods
Add(Object)
Adds the given item to the records.
Declaration
public void Add(object item)
Parameters
Type | Name | Description |
---|---|---|
System.Object | item | The item to be added. |
AddNew()
Adds a new item to the collection.
Declaration
public virtual object AddNew()
Returns
Type | Description |
---|---|
System.Object | The new item that is added to the collection. |
AddNotifyListener(Object)
Adds the notify listener to the given record.
Declaration
public void AddNotifyListener(object record)
Parameters
Type | Name | Description |
---|---|---|
System.Object | record | The record for which the notifier is to be added. |
AdjustBeforeAdd(Object, Int32)
Declaration
protected virtual int AdjustBeforeAdd(object record, int index)
Parameters
Type | Name | Description |
---|---|---|
System.Object | record | |
System.Int32 | index |
Returns
Type |
---|
System.Int32 |
AttachGridView(Object)
Sets grid in the view.
Declaration
public virtual void AttachGridView(object dataGrid)
Parameters
Type | Name | Description |
---|---|---|
System.Object | dataGrid | The reference of the SfDataGrid. |
BeginInit(Boolean)
Signals the object that initialization is starting and so suspends all the data operations in view.
Declaration
public void BeginInit(bool IsProgrammatic = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | IsProgrammatic | The flag IsProgrammatic helps to resume the UI update while IsInDeferRefresh is true. |
CancelEdit()
Ends the edit transaction and, if possible, restores the original value to the item.
Declaration
public void CancelEdit()
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | EditItem is null to CancelEdit |
CancelNew()
Ends the add transaction and discards the pending new item.
Declaration
public virtual void CancelNew()
CanUpdateSummary(ISummaryRow, String)
Checks whether the summary can be updated for the given row and property.
Declaration
protected virtual bool CanUpdateSummary(ISummaryRow row, string propertyName)
Parameters
Type | Name | Description |
---|---|---|
ISummaryRow | row | The summary row which is to be updated. |
System.String | propertyName | The summary column's property which is to be updated. |
Returns
Type | Description |
---|---|
System.Boolean | True if the summary can be updated for the given row and property; otherwise false. |
Clear()
Clears all the items in the record.
Declaration
public void Clear()
CommitEdit()
Ends the edit transaction and saves the pending changes.
Declaration
public virtual void CommitEdit()
CommitNew()
Ends the add transaction and saves the pending new item.
Declaration
public virtual void CommitNew()
Contains(Object)
Determines whether the System.Collections.Generic.ICollection<> contains the given item.
Declaration
public virtual bool Contains(object item)
Parameters
Type | Name | Description |
---|---|---|
System.Object | item | The object to locate in the System.Collections.Generic.ICollection<>. |
Returns
Type | Description |
---|---|
System.Boolean | True if |
CopyTo(Object[], Int32)
Copies the record to the array from the given index.
Declaration
public void CopyTo(object[] array, int arrayIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | array | The array to which the record is to be copied. |
System.Int32 | arrayIndex | The index of the array from which the item is to be copied. |
CreateItemPropertiesProvider()
Creates the ItemPropertiesProvider, to get or set value on the underlying object of the collection view.
Declaration
protected virtual ItemPropertiesProvider CreateItemPropertiesProvider()
Returns
Type | Description |
---|---|
ItemPropertiesProvider | Returns the newly created ItemPropertiesProvider. |
CreateRecordEntry(Object)
Creates the RecordEntry for associated data object.
Declaration
public virtual RecordEntry CreateRecordEntry(object data)
Parameters
Type | Name | Description |
---|---|---|
System.Object | data | The data object to create RecordEntry. |
Returns
Type | Description |
---|---|
RecordEntry | The RecordEntry for the specified data object. |
CreateRecords()
Creates the records for the items in the source of the collection view.
Declaration
protected virtual RecordsList CreateRecords()
Returns
Type | Description |
---|---|
RecordsList | The list of records created for the items in the source of the collection view. |
CreateTopLevelGroup()
Creates a top-level group.
Declaration
protected virtual TopLevelGroup CreateTopLevelGroup()
Returns
Type | Description |
---|---|
TopLevelGroup | The top-level group created. |
DeferRefresh()
Gets a disposable defer helper to suspends the all data operations in view.
Declaration
public IDisposable DeferRefresh()
Returns
Type | Description |
---|---|
System.IDisposable | Returns disposable defer helper to do the bulk changes. |
DeferRefresh(Boolean)
Gets a disposable defer helper to suspends the all data operations in view.
Declaration
public IDisposable DeferRefresh(bool isProgrammatic)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isProgrammatic | True to handle the UI update when do data operation programmtically. |
Returns
Type | Description |
---|---|
System.IDisposable | Returns disposable defer helper to do the bulk changes. |
DetachGridView()
Need to detach the grid instance present in the view while disposing the view.
Declaration
public virtual void DetachGridView()
Dispose()
Disposes all the resources used by the CollectionViewAdv class.
Declaration
public void Dispose()
Dispose(Boolean)
Disposes the unmanaged and optionally disposes the managed resources used by the CollectionViewAdv class.
Declaration
protected virtual void Dispose(bool isDisposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isDisposing | Indicates whether the call is from Dispose method or from a finalizer. |
EditItem(Object)
Begins an edit transaction of the specified item.
Declaration
public void EditItem(object item)
Parameters
Type | Name | Description |
---|---|---|
System.Object | item | The item to edit. |
EndEdit()
Ends editing in the current item.
Declaration
public virtual void EndEdit()
EndInit()
Signals the object that initialization is complete and hence resumes the data operations and reinitialize the view.
Declaration
public void EndInit()
EnsureInitialized()
Represents a method which creates record entry for Records and dispose old records.
Declaration
protected virtual void EnsureInitialized()
EnsureSourceList()
Ensures the source list of the collection view. Call this method in the derived CollectionView once the constructor is called.
Declaration
protected void EnsureSourceList()
EnsureView()
Ensures sorting, grouping and filtering by refreshing the view with updated collection.
Declaration
protected virtual void EnsureView()
FilterRecord(Object)
Filters the record for the specified record condition.
Declaration
public virtual bool FilterRecord(object record)
Parameters
Type | Name | Description |
---|---|---|
System.Object | record | The record to filter the data. |
Returns
Type | Description |
---|---|
System.Boolean | True if the filter condition is satisfied, otherwise false. |
GetActiveComparer()
Gets the active sort comparer of the collection view.
Declaration
protected IComparer<object> GetActiveComparer()
Returns
Type | Description |
---|---|
System.Collections.Generic.IComparer<System.Object> | The active sort comparer of the collection view. |
GetComparerIndex(Object, Int32)
Compares the given index and the index corresponding to the given record.
Call this method when you need to find the compared index of item based on sorting
Declaration
protected virtual int GetComparerIndex(object record, int index)
Parameters
Type | Name | Description |
---|---|---|
System.Object | record | The record whose index is to be compared with the given index. |
System.Int32 | index | The index which is to be compared |
Returns
Type | Description |
---|---|
System.Int32 | Gets the comparer index based on the given index and the index corresponding to the given record. |
GetDataGrid()
Gets the dataGrid present in the view.
Declaration
public virtual object GetDataGrid()
Returns
Type |
---|
System.Object |
GetDisplayValueExpressionFunc(String, DataOperation)
Gets the displayValue expression func for corresponding data operation and property name.
Declaration
public virtual Expression<Func<string, object, object>> GetDisplayValueExpressionFunc(string propertyName, DataOperation operation)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyName | The property name. |
DataOperation | operation | The data operation. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.Expression<System.Func<System.String, System.Object, System.Object>> | The displayValue expression func for corresponding data operation and property name. |
GetDisplayValueFunc(String, DataOperation)
Gets the display value func for corresponding data operation and property name.
Declaration
public virtual Func<string, object, object> GetDisplayValueFunc(string propertyName, DataOperation operation)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyName | The property name. |
DataOperation | operation | The data operation. |
Returns
Type | Description |
---|---|
System.Func<System.String, System.Object, System.Object> | The display value func for corresponding data operation and property name. |
GetEnumerator()
Gets the enumerator for the collection of objects in the record.
Declaration
public virtual IEnumerator<object> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<System.Object> | The enumerator for the collection of objects in the record. |
GetExpressionFunc(String, DataOperation, DataReflectionMode)
Returns the expression func for corresponding property name, data operation and reflection mode.
Declaration
public virtual Expression<Func<string, object, object>> GetExpressionFunc(string propertyName, DataOperation operation, DataReflectionMode reflectionMode)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyName | The property name. |
DataOperation | operation | The data operation. |
DataReflectionMode | reflectionMode | The data reflection mode. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.Expression<System.Func<System.String, System.Object, System.Object>> | The expression func for corresponding property name, data operation and reflection mode. |
GetFunc(String, DataOperation, DataReflectionMode)
Returns The func for corresponding property name, data operation and the reflection mode.
Declaration
public virtual Func<string, object, object> GetFunc(string propertyName, DataOperation operation, DataReflectionMode reflectionMode)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyName | The property name. |
DataOperation | operation | The data operation. |
DataReflectionMode | reflectionMode | The data reflection mode. |
Returns
Type | Description |
---|---|
System.Func<System.String, System.Object, System.Object> | The func for corresponding property name, data operation and the reflection mode. |
GetGroupConverterFunc(String)
Gets the group converter func for the given property.
Declaration
public virtual Func<string, object, object> GetGroupConverterFunc(string propertyName)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyName | The property name. |
Returns
Type | Description |
---|---|
System.Func<System.String, System.Object, System.Object> | The group converter func for the given property. |
GetGroupResult(String[])
Gets the IEnumerable collection of group result for the array of group-by.
Declaration
protected virtual IEnumerable<GroupResult> GetGroupResult(string[] groupBy)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | groupBy | The array of groups |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<GroupResult> | The IEnumerable collection of group result for the array of group-by. |
GetItemAt(Int32)
Returns the item at specified index.
Declaration
public virtual object GetItemAt(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index to get the object. |
Returns
Type | Description |
---|---|
System.Object | Returns the item from records or display elements at specified index |
GetItemProperties()
Gets the collection of item properties, that contains the property and its information.
Declaration
public virtual PropertyDescriptorCollection GetItemProperties()
Returns
Type | Description |
---|---|
System.ComponentModel.PropertyDescriptorCollection | The collection of item properties, that contains the property and its information. |
GetPropertyAccessProvider()
Gets the ItemPropertiesProvider which handles the reflection for CollectionViewAdv.
Declaration
public virtual ItemPropertiesProvider GetPropertyAccessProvider()
Returns
Type | Description |
---|---|
ItemPropertiesProvider | Returns the ItemPropertiesProvider which handles the reflection for CollectionViewAdv. |
GetRecordAt(Int32)
Gets the RecordEntry at the specified index.
Declaration
public virtual RecordEntry GetRecordAt(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index to get the record. |
Returns
Type | Description |
---|---|
RecordEntry | Returns the RecordEntry for the specified index. |
GetSource()
Returns the underlying collection from the SfDataGrid.ItemsSource
.
Declaration
protected virtual IEnumerable GetSource()
Returns
Type | Description |
---|---|
System.Collections.IEnumerable | The underlying collection from the |
GetSourceListCollection()
Returns the SourceCollection as IList to handle the CRUD operations.
Declaration
protected IList GetSourceListCollection()
Returns
Type | Description |
---|---|
System.Collections.IList | Returns the SourceCollection as list to handle the CRUD operations. |
IndexOf(Object)
Gets the index of the given item.
Declaration
public virtual int IndexOf(object item)
Parameters
Type | Name | Description |
---|---|---|
System.Object | item | The item whose index is to be obtained. |
Returns
Type | Description |
---|---|
System.Int32 | The index of the given item. |
InitiateCollectionViewAdv()
Initializes the collection view, which initializes the sort descriptions, summary rows, table summary rows and filter predicates of the collection view.
Declaration
protected void InitiateCollectionViewAdv()
Insert(Int32, Object)
Inserts the given item at the given index.
Declaration
public void Insert(int index, object item)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index at which the item is to be added. |
System.Object | item | The item to be added. |
LoadMoreItemsAsync(UInt32)
Loads the items asynchronously to the view.
Declaration
public void LoadMoreItemsAsync(uint count)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | count | The count of the items to be loaded. |
MoveCurrentTo(Object)
Move CurrentItem to the given item.
Declaration
public virtual bool MoveCurrentTo(object item)
Parameters
Type | Name | Description |
---|---|---|
System.Object | item | Move CurrentItem to this item. |
Returns
Type | Description |
---|---|
System.Boolean | True if CurrentItem points to an item within the view. |
MoveCurrentToFirst()
Move CurrentItem to the first item.
Declaration
public bool MoveCurrentToFirst()
Returns
Type | Description |
---|---|
System.Boolean | True if CurrentItem points to an item within the view. |
MoveCurrentToLast()
Move CurrentItem to the last item.
Declaration
public bool MoveCurrentToLast()
Returns
Type | Description |
---|---|
System.Boolean | True if CurrentItem points to an item within the view. |
MoveCurrentToNext()
Move CurrentItem to the next item.
Declaration
public bool MoveCurrentToNext()
Returns
Type | Description |
---|---|
System.Boolean | True if CurrentItem points to an item within the view. |
MoveCurrentToPosition(Int32)
Move CurrentItem to the item at the given index.
Declaration
public virtual bool MoveCurrentToPosition(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Move CurrentItem to this index |
Returns
Type | Description |
---|---|
System.Boolean | True if CurrentItem points to an item within the view. |
MoveCurrentToPrevious()
Move CurrentItem to the previous item.
Declaration
public bool MoveCurrentToPrevious()
Returns
Type | Description |
---|---|
System.Boolean | True if CurrentItem points to an item within the view. |
NotifyPropertyChangedHandler(Object, PropertyChangedEventArgs)
This method fires when the property is changed.
Declaration
protected virtual void NotifyPropertyChangedHandler(object sender, PropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The sender of the event. |
System.ComponentModel.PropertyChangedEventArgs | e | The System.ComponentModel.PropertyChangedEventArgs that contains the event for the data. |
OnCollectionChanged(NotifyCollectionChangedEventArgs)
This method fires when the underlying collection is changed.
Declaration
public void OnCollectionChanged(NotifyCollectionChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Specialized.NotifyCollectionChangedEventArgs | args | The System.Collections.Specialized.NotifyCollectionChangedEventArgs containing the data for the event. |
OnPropertyChanged(Object, PropertyChangedEventArgs)
This method fires when the property is changed.
Declaration
public void OnPropertyChanged(object sender, PropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The original sender of the event. |
System.ComponentModel.PropertyChangedEventArgs | e | The System.ComponentModel.PropertyChangedEventArgs representing the data for the event. |
OnRecordCollectionChanged(Object, NotifyCollectionChangedEventArgs)
This method fires when the record collection is changed.
Declaration
protected virtual void OnRecordCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The sender of the event. |
System.Collections.Specialized.NotifyCollectionChangedEventArgs | e | The System.Collections.Specialized.NotifyCollectionChangedEventArgs that contains the event data. |
OnRecordPropertyChanged(Object, PropertyChangedEventArgs)
This method fires when the record property is changed.
Declaration
protected virtual void OnRecordPropertyChanged(object sender, PropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The original sender of the event. |
System.ComponentModel.PropertyChangedEventArgs | e | The System.ComponentModel.PropertyChangedEventArgsthat contains the event data. |
OnSortDescriptionChanged(NotifyCollectionChangedEventArgs)
This method fires when the sort description is changed.
Declaration
protected virtual void OnSortDescriptionChanged(NotifyCollectionChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Specialized.NotifyCollectionChangedEventArgs | e | The System.Collections.Specialized.NotifyCollectionChangedEventArgs that contains the event data. |
OnTopLevelGroupCollectionChanged(Object, NotifyCollectionChangedEventArgs)
This method fires when the top-level group collection is changed.
Declaration
protected virtual void OnTopLevelGroupCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The sender of the event. |
System.Collections.Specialized.NotifyCollectionChangedEventArgs | e | The System.Collections.Specialized.NotifyCollectionChangedEventArgs that contains the event data. |
OnTopLevelGroupPopulated(TopLevelGroup)
This method fires when the top-level group is populated.
Declaration
protected virtual void OnTopLevelGroupPopulated(TopLevelGroup topLevelGroup)
Parameters
Type | Name | Description |
---|---|---|
TopLevelGroup | topLevelGroup | The instance of top-level group. |
RaiseCollectionChangedEvent(NotifyCollectionChangedEventArgs)
Raises the CollectionChanged event of the collection view.
Declaration
protected void RaiseCollectionChangedEvent(NotifyCollectionChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Specialized.NotifyCollectionChangedEventArgs | args | The System.Collections.Specialized.NotifyCollectionChangedEventArgs data for the event |
RaiseCurrentChangedEvent()
Raises the CurrentChanged event.
Declaration
protected void RaiseCurrentChangedEvent()
RaiseExceptionThrownEvent(Exception)
Raises the exception thrown event.
Declaration
protected virtual void RaiseExceptionThrownEvent(Exception exception)
Parameters
Type | Name | Description |
---|---|---|
System.Exception | exception | The data for the event which contains the exception details. |
RaiseGroupCollectionChanged(NotifyGroupsChangedEventArgs)
Raises the TopLevelGroupCollectionChanged event.
Declaration
protected virtual void RaiseGroupCollectionChanged(NotifyGroupsChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
NotifyGroupsChangedEventArgs | e | The NotifyGroupsChangedEventArgs representing the data for the event. |
RaisePropertyChanged(String)
Raises the property changed event.
Declaration
protected void RaisePropertyChanged(string propertyName)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyName |
RaiseSourceCollectionChangedEvent(NotifyCollectionChangedEventArgs)
Raises the source collection changed event.
Declaration
protected void RaiseSourceCollectionChangedEvent(NotifyCollectionChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Specialized.NotifyCollectionChangedEventArgs | args | The System.Collections.Specialized.NotifyCollectionChangedEventArgs that contains the event data. |
Refresh()
Refreshes the view.
Declaration
public void Refresh()
RefreshFilter(Boolean)
Refreshes the view when the filtering is applied through FilterRecord(Object) delegate.
Declaration
public virtual void RefreshFilter(bool IsProgrammatic = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | IsProgrammatic | A boolean value indicating whether filtering is done programmatically. |
RefreshSort()
Refreshes the sorting in the collection view.
Declaration
protected virtual void RefreshSort()
RefreshTopLevelGroup()
Refreshes the top-level group.
Declaration
protected void RefreshTopLevelGroup()
RefreshView(NotifyCollectionChangedEventArgs)
Refreshes the view when the underlying collection is changed.
Declaration
protected void RefreshView(NotifyCollectionChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Specialized.NotifyCollectionChangedEventArgs | args | The System.Collections.Specialized.NotifyCollectionChangedEventArgs that contains the event data. |
Remove(Object)
Removes the given item from the collection.
Declaration
public virtual void Remove(object item)
Parameters
Type | Name | Description |
---|---|---|
System.Object | item | The item to be removed. |
RemoveAt(Int32)
Removes the item at the specified position from the collection.
Declaration
public void RemoveAt(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The position of the item to remove. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Index is less than 0 or greater than the number of items in the collection view. |
RemoveNotifyListener(Object)
Removes the notify listener from the record.
Declaration
public void RemoveNotifyListener(object record)
Parameters
Type | Name | Description |
---|---|---|
System.Object | record | The record for which the notifier is to be removed. |
RemoveRecord(Object)
Removes the given record from the record collection.
Declaration
protected virtual void RemoveRecord(object record)
Parameters
Type | Name | Description |
---|---|---|
System.Object | record | The record to be removed. |
ResetFilter()
Resets the Filter.
Declaration
protected virtual void ResetFilter()
SetActiveComparer()
Sets the active sort comparer of the collection view based on the sort descriptions, sort comparers and the culture of the collection.
Declaration
protected void SetActiveComparer()
SetCurrent(Object, Int32)
Sets the given item at the given index.
Declaration
protected virtual void SetCurrent(object newItem, int newPosition)
Parameters
Type | Name | Description |
---|---|---|
System.Object | newItem | The item to be added at the given position. |
System.Int32 | newPosition | The index at which the item is to be added. |
SetCurrent(Object, Int32, Int32)
Sets the given item at the given index.
Declaration
protected void SetCurrent(object newItem, int newPosition, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Object | newItem | The item to be added at the given position. |
System.Int32 | newPosition | The index at which the item is to be added. |
System.Int32 | count | The number of records count in the view. |
SetFlag(CollectionViewAdv.CollectionViewFlags, Boolean)
Sets the flag to the collection view.
Declaration
protected void SetFlag(CollectionViewAdv.CollectionViewFlags flags, bool value)
Parameters
Type | Name | Description |
---|---|---|
CollectionViewAdv.CollectionViewFlags | flags | The CollectionViewAdv.CollectionViewFlags indicating the flag to be set. |
System.Boolean | value | The value indicating whether the flag can be set. |
SetItemProperties(IEnumerable)
Sets ItemProperties from specified dataSource.
Declaration
protected void SetItemProperties(IEnumerable dataSource)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEnumerable | dataSource | The bound dataSource. |
SetSource(IEnumerable)
Sets the source of the collection view.
Declaration
protected virtual void SetSource(IEnumerable _source)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEnumerable | _source | The source to be set. |
SetSourceType(Type)
Sets the source type from bound control.
Declaration
public void SetSourceType(Type sourceType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | sourceType | The sourceType. |
SourceListChanged(Object, ListChangedEventArgs)
Handles the System.ComponentModel.IBindingList.ListChanged event.
Declaration
protected virtual void SourceListChanged(object sender, ListChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The original sender of the event. |
System.ComponentModel.ListChangedEventArgs | e | The System.ComponentModel.ListChangedEventArgs that contains the event data. |
UnWireEvents()
Unwires all the events in the collection view.
Declaration
public void UnWireEvents()
UpdateCollectionView(Object, NotifyCollectionChangedEventArgs)
This method handles the source collection changed event.
Declaration
protected virtual void UpdateCollectionView(object sender, NotifyCollectionChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The sender of the event. |
System.Collections.Specialized.NotifyCollectionChangedEventArgs | e | The System.Collections.Specialized.NotifyCollectionChangedEventArgs that contains the event data. |
Events
CollectionChanged
Occurs when the underlying collection changed.
Declaration
public event NotifyCollectionChangedEventHandler CollectionChanged
Event Type
Type |
---|
System.Collections.Specialized.NotifyCollectionChangedEventHandler |
CurrentChanged
Occurs when the current item is changed.
Declaration
public event EventHandler CurrentChanged
Event Type
Type |
---|
System.EventHandler |
PropertyChanged
Occurs when the property is changed.
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type |
---|
System.ComponentModel.PropertyChangedEventHandler |
RecordPropertyChanged
Occurs when the record property changes.
Declaration
public event PropertyChangedEventHandler RecordPropertyChanged
Event Type
Type |
---|
System.ComponentModel.PropertyChangedEventHandler |
SourceCollectionChanged
Occurs when the underlying source collection changed.
Declaration
public event NotifyCollectionChangedEventHandler SourceCollectionChanged
Event Type
Type |
---|
System.Collections.Specialized.NotifyCollectionChangedEventHandler |
TopLevelGroupCollectionChanged
Occurs when the top level group collection changed.
Declaration
public event NotifyCollectionChangedEventHandler TopLevelGroupCollectionChanged
Event Type
Type |
---|
System.Collections.Specialized.NotifyCollectionChangedEventHandler |