Class DataTableCollectionView
Represents the class that maintains the collection view of type data table collection view, when the SfDataGrid is bind to the data table collection view.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Data
Assembly: Syncfusion.Data.Portable.dll
Syntax
public class DataTableCollectionView : CollectionViewAdv, ICollectionViewAdv, ICollectionView, IEnumerable, INotifyCollectionChanged, INotifyPropertyChanged, ISupportInitialize, IDisposable, IPropertyChangedEventHandler, IEditableCollectionView, ISupportIncrementalLoading, IUnboundExpressionFunc, IGridViewNotifier
Constructors
DataTableCollectionView()
Initializes a new instance of DataTableCollectionView class.
Declaration
public DataTableCollectionView()
DataTableCollectionView(IEnumerable)
Initializes a new instance of DataTableCollectionView class.
Declaration
public DataTableCollectionView(IEnumerable source)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEnumerable | source | The IEnumerable source for the collection view. |
Properties
RowFilter
Gets or sets the expression used to filter which rows are viewed in the DataView.
Declaration
public string RowFilter { get; set; }
Property Value
Type | Description |
---|---|
System.String | The expression used to filter which rows are viewed in the DataView. |
ViewSource
Gets the view source of the collection view.
Declaration
public DataView ViewSource { get; }
Property Value
Type | Description |
---|---|
System.Data.DataView | The view source of the collection view. |
Methods
AddNew()
Adds a new item to the collection.
Declaration
public override object AddNew()
Returns
Type | Description |
---|---|
System.Object | The new item that is added to the collection. |
Overrides
CancelNew()
Ends the add transaction and discards the pending new item.
Declaration
public override void CancelNew()
Overrides
CommitEdit()
Ends the edit transaction and saves the pending changes.
Declaration
public override void CommitEdit()
Overrides
CommitNew()
Ends the add transaction and saves the pending new item.
Declaration
public override void CommitNew()
Overrides
CreateRecords()
Creates the records for the items in the source of the collection view.
Declaration
protected override RecordsList CreateRecords()
Returns
Type | Description |
---|---|
RecordsList | The list of records created for the items in the source of the collection view. |
Overrides
FilterRecord(Object)
Filters the record for the specified record condition.
Declaration
public override 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. |
Overrides
GetGroupResult(String[])
Gets the IEnumerable collection of group result for the array of group-by.
Declaration
protected override 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. |
Overrides
GetSource()
Gets the source of the collection view.
Declaration
protected override IEnumerable GetSource()
Returns
Type | Description |
---|---|
System.Collections.IEnumerable | The source of the collection view. |
Overrides
OnSortDescriptionChanged(NotifyCollectionChangedEventArgs)
This method fires when the sort description is changed.
Declaration
protected override void OnSortDescriptionChanged(NotifyCollectionChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Specialized.NotifyCollectionChangedEventArgs | e | The System.Collections.Specialized.NotifyCollectionChangedEventArgs that contains the event data. |
Overrides
RefreshFilter(Boolean)
Refreshes the view when the filtering is applied through FilterRecord(Object) delegate.
Declaration
public override void RefreshFilter(bool isProgrammatic = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isProgrammatic | A boolean value indicating whether filtering is done programmatically. |
Overrides
RefreshSort()
Refreshes the sorting.
Declaration
protected override void RefreshSort()
Overrides
RefreshSortingOrderWithFiltersForBottomLevel(List<Group>, String, Int32)
Refreshes the sorting order with filters for the bottom-level groups.
Declaration
protected virtual void RefreshSortingOrderWithFiltersForBottomLevel(List<Group> groups, string previousFilter, int level)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<Group> | groups | The list of groups in the bottom level. |
System.String | previousFilter | The previous filter applied. |
System.Int32 | level | The level of the group. |
ResetFilter()
Refreshes the filtering.
Declaration
protected override void ResetFilter()
Overrides
SetSource(IEnumerable)
Sets the source for the collection view.
Declaration
protected override void SetSource(IEnumerable _source)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEnumerable | _source | The source to be set for the collection view. |
Overrides
SourceListChanged(Object, ListChangedEventArgs)
Handles the System.ComponentModel.IBindingList.ListChanged event.
Declaration
protected override 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. |
Overrides
UpdateCollectionView(Object, NotifyCollectionChangedEventArgs)
This method fires when the collection is changed.
Declaration
protected override void UpdateCollectionView(object sender, NotifyCollectionChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The original sender of the event. |
System.Collections.Specialized.NotifyCollectionChangedEventArgs | e | The System.Collections.Specialized.NotifyCollectionChangedAction which represents the collection changed action. |