Class QueryableCollectionView
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Data
Assembly: Syncfusion.Data.Portable.dll
Syntax
public class QueryableCollectionView : CollectionViewAdv, ICollectionViewAdv, ICollectionView, IEnumerable, INotifyCollectionChanged, INotifyPropertyChanged, ISupportInitialize, IDisposable, IPropertyChangedEventHandler, IEditableCollectionView, ISupportIncrementalLoading, IUnboundExpressionFunc, IGridViewNotifier, IFilterExt, IParallelizableView
Constructors
QueryableCollectionView()
Initializes a new instance of the QueryableCollectionView class.
Declaration
public QueryableCollectionView()
QueryableCollectionView(IEnumerable)
Initializes a new instance of the QueryableCollectionView class.
Declaration
public QueryableCollectionView(IEnumerable source)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEnumerable | source | The IEnumerable source of the collection view. |
QueryableCollectionView(IEnumerable, Type)
Initializes a new instance of the QueryableCollectionView class.
Declaration
public QueryableCollectionView(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. |
Properties
RowFilter
Gets or sets the predicate for the row filter.
Declaration
public Predicate<object> RowFilter { get; set; }
Property Value
Type | Description |
---|---|
System.Predicate<System.Object> | The predicate for the row filter. |
UsePLINQ
Gets or sets a value indicating whether to use PLINQ.
Declaration
public bool UsePLINQ { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | True if PLINQ is used, otherwise false. |
ViewSource
Gets the queryable collection for the source of the collection view.
Declaration
public IQueryable ViewSource { get; }
Property Value
Type | Description |
---|---|
System.Linq.IQueryable | The queryable collection for the source of the collection view. |
Methods
CanExecuteParallel(DataOperation)
Invokes to check whether source is need to execute execute in Parallel Query.
Declaration
protected virtual bool CanExecuteParallel(DataOperation operation)
Parameters
Type | Name | Description |
---|---|---|
DataOperation | operation | DataOperation |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if source is execute in parallel query |
CreateRecords()
Creates the records for the items in the ViewSource.
Declaration
protected override RecordsList CreateRecords()
Returns
Type | Description |
---|---|
RecordsList | The list of records created for the items in the ViewSource. |
Overrides
CreateRowFilterPredicate()
Creates a row filter predicate, which filters the items to be displayed in the view.
Declaration
protected virtual void CreateRowFilterPredicate()
FilterRecord(Object)
Returns a boolean value indicating whether to filter underlying data from adding it to View.Records collection.
Declaration
public override bool FilterRecord(object record)
Parameters
Type | Name | Description |
---|---|---|
System.Object | record | The record to filter. |
Returns
Type | Description |
---|---|
System.Boolean | A boolean value indicating whether to filter underlying data from adding it to View.Records collection. |
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
GetPredicateExpression(IQueryable, out ParameterExpression)
Gets the predicate expression for the given source and parameter expression.
Declaration
public virtual Expression GetPredicateExpression(IQueryable source, out ParameterExpression parameterExpression)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source |
System.Linq.Expressions.ParameterExpression | parameterExpression | The parameter expression. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.Expression | The predicate expression for the given source and parameter expression. |
GetPredicateExpression(IQueryable, out ParameterExpression, String, Boolean)
Declaration
public Expression GetPredicateExpression(IQueryable source, out ParameterExpression parameterExpression, string columnName, bool returncolExpression)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.Linq.Expressions.ParameterExpression | parameterExpression | The parameter expression. |
System.String | columnName | The column name. |
System.Boolean | returncolExpression | A boolean value indicating whether to return the column expression. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.Expression | The predicate expression for the given values. |
GetQueryableSource()
Returns the IQueryable source of the collection view.
Declaration
protected virtual IQueryable GetQueryableSource()
Returns
Type | Description |
---|---|
System.Linq.IQueryable | The IQueryable source of the collection view. |
Remarks
PagedCollectionView returns paged source as IQueryable. Returning query will be sorted query in the case of normal VirtualizingCollectionView. It will be sorted and filtered query in the case of PagedCollectionVeiw and OnDemand VirtualizingCollectionView.
OnSortDescriptionChanged(NotifyCollectionChangedEventArgs)
This method fires when the sort description collection is changed.
Declaration
protected override void OnSortDescriptionChanged(NotifyCollectionChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Specialized.NotifyCollectionChangedEventArgs | e | The System.Collections.Specialized.NotifyCollectionChangedEventArgs representing the data for the event. |
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 sorting in the view.
Declaration
protected override void RefreshSort()
Overrides
RefreshSortingOrderWithFiltersForBottomLevel(List<Group>)
Refreshes the sorting order with filters on the records in the bottom-level group.
Declaration
protected virtual void RefreshSortingOrderWithFiltersForBottomLevel(List<Group> groups)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<Group> | groups | The list of groups in the view. |
ResetFilter()
Resets the filter of the collection view.
Declaration
protected override void ResetFilter()
Overrides
SortQueryable(IQueryable, SortDescriptionCollection)
Sets the given source and the sort fields as queryable.
Declaration
protected virtual IQueryable SortQueryable(IQueryable source, SortDescriptionCollection sortFields = null)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source of the items which has to be queried. |
SortDescriptionCollection | sortFields | The sort fields of the source which has to be queried. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | The IQueryable source of the items which is queried. |