Class
DataProvider

Represent a set of members that functionally affects RadVirtualGrid. They can be overridden to modify its behavior.

Definition

Namespace:Telerik.Windows.Controls.VirtualGrid

Assembly:Telerik.Windows.Controls.VirtualGrid.dll

Syntax:

cs-api-definition
public class DataProvider

Inheritance: objectDataProvider

Constructors

DataProvider(IEnumerable)

Initializes a new instance of the DataProvider class.

Declaration

cs-api-definition
public DataProvider(IEnumerable source)

Parameters

source

IEnumerable

The source.

Properties

DistinctValuesLimit

Gets or sets the maximum count of distinct values.

Declaration

cs-api-definition
public int DistinctValuesLimit { get; set; }

Property Value

int

InitialColumnCount

Represents the initial column count.

Declaration

cs-api-definition
protected virtual int InitialColumnCount { get; }

Property Value

int

InitialRowCount

Represents the initial row count.

Declaration

cs-api-definition
protected virtual int InitialRowCount { get; }

Property Value

int

ItemProperties

Gets the item properties.

Declaration

cs-api-definition
public virtual IList<ItemPropertyInfo> ItemProperties { get; }

Property Value

IList<ItemPropertyInfo>

The item properties.

ParentGrid

Gets or sets the instance of the RadVirtualGrid that uses the DataProvider.

Declaration

cs-api-definition
protected RadVirtualGrid ParentGrid { get; set; }

Property Value

RadVirtualGrid

ShouldPushEditValueToGrid

Gets a value that indicates whether the new cell value should be pushed to VirtualGrid after CellEditEnded.

Declaration

cs-api-definition
protected virtual bool ShouldPushEditValueToGrid { get; }

Property Value

bool

Source

Gets or sets a Source QCV collection that enables data operations.

Declaration

cs-api-definition
protected QueryableCollectionView Source { get; set; }

Property Value

QueryableCollectionView

Methods

ApplyFilterDescriptor(ColumnFilterDescriptor)

Adds the filter descriptor to the Source QCV.

Declaration

cs-api-definition
protected virtual void ApplyFilterDescriptor(ColumnFilterDescriptor descriptor)

Parameters

descriptor

ColumnFilterDescriptor

ApplySortDescriptor(ColumnSortDescriptor)

Adds the sort descriptor to the Source QCV.

Declaration

cs-api-definition
protected virtual void ApplySortDescriptor(ColumnSortDescriptor descriptor)

Parameters

descriptor

ColumnSortDescriptor

CreateEditor(out FrameworkElement, out DependencyProperty, object, int)

Creates an editor.

Declaration

cs-api-definition
protected virtual void CreateEditor(out FrameworkElement editor, out DependencyProperty editorProperty, object propertyValue, int columnIndex)

Parameters

editor

FrameworkElement

editorProperty

DependencyProperty

propertyValue

object

columnIndex

int

DataMemberNeeded(DataMemberEventArgs)

Assigns the DataMemberEventArgs properties based on the values in ItemProperties.

Declaration

cs-api-definition
protected virtual void DataMemberNeeded(DataMemberEventArgs e)

Parameters

e

DataMemberEventArgs

DistinctValuesLoading(DistinctValuesLoadingEventArgs)

Initializes DistinctValuesLoadingEventArgs.ItemsSource based on ItemProperties value.

Declaration

cs-api-definition
protected virtual void DistinctValuesLoading(DistinctValuesLoadingEventArgs e)

Parameters

e

DistinctValuesLoadingEventArgs

FilterDescriptorsPrepared(FilteredEventArgs)

The method is called when the FilterDescriptors are prepared and a filter operation will occur.

Declaration

cs-api-definition
protected virtual void FilterDescriptorsPrepared(FilteredEventArgs e)

Parameters

e

FilteredEventArgs

FilterDescriptorsPreparing(FilteringEventArgs)

The method is called when the FilterDescriptors are being prepared.

Declaration

cs-api-definition
protected virtual void FilterDescriptorsPreparing(FilteringEventArgs e)

Parameters

e

FilteringEventArgs

FilterOperatorsLoading(FilterOperatorsLoadingEventArgs)

The method is invoked when the FilterOperators for a given column are being loaded.

Declaration

cs-api-definition
protected virtual void FilterOperatorsLoading(FilterOperatorsLoadingEventArgs e)

Parameters

e

FilterOperatorsLoadingEventArgs

InsertItemInSource()

Inserts a new item in source.

Declaration

cs-api-definition
protected virtual void InsertItemInSource()

IsColumnReadOnly(int)

Determines whether a given column is ReadOnly.

Declaration

cs-api-definition
protected virtual bool IsColumnReadOnly(int columnIndex)

Parameters

columnIndex

int

Returns

bool

OnCellEditEnded(CellEditEndedEventArgs)

Invoked by RadVirtualGrid when the CellEditEnded event is raised.

Declaration

cs-api-definition
protected virtual void OnCellEditEnded(CellEditEndedEventArgs e)

Parameters

e

CellEditEndedEventArgs

OnCellToolTipNeeded(VirtualGridCellToolTipEventArgs)

Invoked by RadVirtualGrid when the CellToolTipNeeded event is raised.

Declaration

cs-api-definition
protected virtual void OnCellToolTipNeeded(VirtualGridCellToolTipEventArgs valueEventArgs)

Parameters

valueEventArgs

VirtualGridCellToolTipEventArgs

OnCellValueNeeded(CellValueEventArgs)

Invoked by RadVirtualGrid when the CellValueNeeded event is raised.

Declaration

cs-api-definition
protected virtual void OnCellValueNeeded(CellValueEventArgs valueEventArgs)

Parameters

valueEventArgs

CellValueEventArgs

OnEditorNeeded(EditorNeededEventArgs)

Invoked by RadVirtualGrid when the EditorNeeded event is raised.

Declaration

cs-api-definition
protected virtual void OnEditorNeeded(EditorNeededEventArgs args)

Parameters

args

EditorNeededEventArgs

OnEditorValueChanged(CellValueEventArgs)

Invoked by RadVirtualGrid when the EditorValueChanged event is raised.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
protected virtual void OnEditorValueChanged(CellValueEventArgs args)

Parameters

args

CellValueEventArgs

OnFilteringCompleted()

The method is called when the filter operation is completed.

Declaration

cs-api-definition
protected virtual void OnFilteringCompleted()

OnHeaderValueNeeded(HeaderValueEventArgs)

Invoked by RadVirtualGrid when the HeaderValueNeeded event is raised.

Declaration

cs-api-definition
protected virtual void OnHeaderValueNeeded(HeaderValueEventArgs e)

Parameters

e

HeaderValueEventArgs

OnSortingCompleted()

The method is called when the sort operation is completed.

Declaration

cs-api-definition
protected virtual void OnSortingCompleted()

PushCellValueToSource(int, int, object)

Invoked by RadVirtualGrid when the CellEditEnded event is raised.

Declaration

cs-api-definition
protected virtual void PushCellValueToSource(int rowIndex, int columnIndex, object value)

Parameters

rowIndex

int

columnIndex

int

value

object

RemoveAllColumnFilters()

Removes all column filters from the Source QCV.

Declaration

cs-api-definition
protected virtual void RemoveAllColumnFilters()

RemoveColumnFilter(ColumnFilterDescriptor)

Removes the given filter descriptor from the Source QCV.

Declaration

cs-api-definition
protected virtual void RemoveColumnFilter(ColumnFilterDescriptor descriptor)

Parameters

descriptor

ColumnFilterDescriptor

RemoveItemsFromSource(List<int>)

Removes items from source.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1002:DoNotExposeGenericLists")]
protected virtual void RemoveItemsFromSource(List<int> indexesToDelete)

Parameters

indexesToDelete

List<int>

SortDescriptorPrepared(SortedEventArgs)

The method is called when the SortDescriptors are prepared and a sort operation will occur.

Declaration

cs-api-definition
protected virtual void SortDescriptorPrepared(SortedEventArgs e)

Parameters

e

SortedEventArgs

SortDescriptorPreparing(SortingEventArgs)

The method is called when the SortDescriptors are being prepared.

Declaration

cs-api-definition
protected virtual void SortDescriptorPreparing(SortingEventArgs e)

Parameters

e

SortingEventArgs