Class
GridViewTemplate

This component represents a customizable view template for displaying flat tabular data.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.GridView.dll

Syntax:

cs-api-definition
public class GridViewTemplate : Component, IComponent, IDisposable, IDataItemSource, IHierarchicalRow, INotifyPropertyChangingEx, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IGridViewEventListener

Inheritance: objectMarshalByRefObjectComponentGridViewTemplate

Derived Classes: MasterGridViewTemplate

Implements: IComponentIDataItemSourceIDisposableIGridViewEventListenerIHierarchicalRowINotifyPropertyChangedINotifyPropertyChangingExISupportInitializeISupportInitializeNotification

Inherited Members Component.Dispose()Component.GetService(Type)Component.ToString()Component.CanRaiseEventsComponent.EventsComponent.SiteComponent.ContainerComponent.DesignModeComponent.DisposedMarshalByRefObject.MemberwiseClone(bool)MarshalByRefObject.GetLifetimeService()MarshalByRefObject.InitializeLifetimeService()MarshalByRefObject.CreateObjRef(Type)

Constructors

GridViewTemplate()

Initializes a new instance of the GridViewTemplate class.

Declaration

cs-api-definition
public GridViewTemplate()

Properties

AddNewRowPosition

Gets or sets a value indicating the location of the new row in the view template.

Declaration

cs-api-definition
[Browsable(true)]
public SystemRowPosition AddNewRowPosition { get; set; }

Property Value

SystemRowPosition

AllowAddNewRow

Gets or sets a value indicating whether the user can add new rows through the grid.

Declaration

cs-api-definition
[Browsable(true)]
public bool AllowAddNewRow { get; set; }

Property Value

bool

Remarks

When set to true an empty row is added in which the user can enter data for the new record. Set to false to hide the row.
The row position is controlled through AddNewRowPosition

AllowAutoSizeColumns

Gets or sets a value indicating whether user can automatically resize a column to fit its content by double-clicking the right border of header cell.

Declaration

cs-api-definition
[Browsable(false)]
public bool AllowAutoSizeColumns { get; set; }

Property Value

bool

AllowCellContextMenu

Gets or sets a value indicating whether context menu is displayed when user right clicks on a data cell.

Declaration

cs-api-definition
[Browsable(true)]
public bool AllowCellContextMenu { get; set; }

Property Value

bool

AllowColumnChooser

Gets or sets a value indicating whether GridViewColumnChooser is available to the user for this instance of GridViewTemplate.

Declaration

cs-api-definition
[Browsable(true)]
public bool AllowColumnChooser { get; set; }

Property Value

bool

AllowColumnHeaderContextMenu

Gets or sets a value indicating whether context menu is displayed when user right-clicks on a column header.

Declaration

cs-api-definition
[Browsable(true)]
public bool AllowColumnHeaderContextMenu { get; set; }

Property Value

bool

AllowColumnReorder

Gets or sets a value indicating whether user can reorder Columns.

Declaration

cs-api-definition
[Browsable(true)]
public bool AllowColumnReorder { get; set; }

Property Value

bool

AllowColumnResize

Gets or sets a value indicating whether user can resize columns.

Declaration

cs-api-definition
[Browsable(true)]
public bool AllowColumnResize { get; set; }

Property Value

bool

Remarks

This property does not prevent developer from setting Width

AllowDeleteRow

Gets or sets a value indicating whether user can delete rows.

Declaration

cs-api-definition
[Browsable(true)]
public bool AllowDeleteRow { get; set; }

Property Value

bool

AllowDragToGroup

Gets or sets a value indicating whether user can drag a column header to grouping panel.

Declaration

cs-api-definition
[Browsable(true)]
public bool AllowDragToGroup { get; set; }

Property Value

bool

AllowEditRow

Gets or sets a value indicating whether user can edit rows.

Declaration

cs-api-definition
[Browsable(true)]
public bool AllowEditRow { get; set; }

Property Value

bool

AllowMultiColumnSorting

Gets or sets a value indicating whether the end-user can sort by more than one column.

Declaration

cs-api-definition
[Browsable(true)]
public bool AllowMultiColumnSorting { get; set; }

Property Value

bool

AllowRowHeaderContextMenu

Gets or sets a value indicating whether context menu is displayed when user right clicks on a row header.

Declaration

cs-api-definition
[Browsable(true)]
public bool AllowRowHeaderContextMenu { get; set; }

Property Value

bool

AllowRowReorder

Gets or sets a value indicating whether the user is able to reorder rows in the grid

Declaration

cs-api-definition
[Browsable(true)]
public bool AllowRowReorder { get; set; }

Property Value

bool

AllowRowResize

Gets or sets a value indicating whether user can resize a row.

Declaration

cs-api-definition
[Browsable(true)]
public bool AllowRowResize { get; set; }

Property Value

bool

Remarks

This property does not prevent developer from setting Height

AllowSearchRow

Gets or sets a value indicating whether the user can search in the data contained in the grid.

Declaration

cs-api-definition
[Browsable(true)]
public bool AllowSearchRow { get; set; }

Property Value

bool

Remarks

When set to true a search row is added where the user can enter search criteria. Set to false to hide the row. The row position is controlled through SearchRowPosition

AutoExpandGroups

Sets or gets a value indicating the initial state of group rows when data is grouped.

Declaration

cs-api-definition
[Browsable(true)]
public bool AutoExpandGroups { get; set; }

Property Value

bool

AutoGenerateColumns

Gets or sets a value indicating whether columns are created automatically when the or properties are set.

Declaration

cs-api-definition
[Browsable(true)]
public bool AutoGenerateColumns { get; set; }

Property Value

bool

Returns true if the columns should be created automatically; otherwise, false. The default is true.

AutoSizeColumnsMode

Gets or sets a value indicating how column widths are determined.

Declaration

cs-api-definition
[Browsable(true)]
public GridViewAutoSizeColumnsMode AutoSizeColumnsMode { get; set; }

Property Value

GridViewAutoSizeColumnsMode

AutoUpdateObjectRelationalSource

Gets or sets a value indicating whether the underlying source in Object-relational binding should be automatically updated on create,update or delete operations (enables CRUD in Object-relational mode).

Declaration

cs-api-definition
[Browsable(true)]
public bool AutoUpdateObjectRelationalSource { get; set; }

Property Value

bool

BindingContext

Gets or sets the binding context for data binding operations.

Declaration

cs-api-definition
[Browsable(false)]
public BindingContext BindingContext { get; }

Property Value

BindingContext

The BindingContext used for data binding.

Implements IDataItemSource.BindingContext

BottomPinnedRowsMode

Gets or sets a value indicating how bottom pinned rows are laid out.

Declaration

cs-api-definition
[Browsable(true)]
public GridViewBottomPinnedRowsMode BottomPinnedRowsMode { get; set; }

Property Value

GridViewBottomPinnedRowsMode

Caption

Gets or sets the caption text.

Declaration

cs-api-definition
[Browsable(true)]
public string Caption { get; set; }

Property Value

string

CaseSensitive

Indicates whether string comparisons of data are case-sensitive.

Declaration

cs-api-definition
[Browsable(true)]
public bool CaseSensitive { get; set; }

Property Value

bool

ChildRows

Gets the collection of child rows for this grid view template.

Declaration

cs-api-definition
[Browsable(false)]
public GridViewChildRowCollection ChildRows { get; }

Property Value

GridViewChildRowCollection

A GridViewChildRowCollection containing the child rows.

Implements IHierarchicalRow.ChildRows

ChildViewTabsPosition

Gets or sets the position to place tabs for child views related with this template.

Declaration

cs-api-definition
[Browsable(true)]
public TabPositions ChildViewTabsPosition { get; set; }

Property Value

TabPositions

ColumnCount

Gets or sets the number of columns displayed in the current GridViewTemplate.

Declaration

cs-api-definition
[Browsable(false)]
public int ColumnCount { get; set; }

Property Value

int

Columns

Gets the collection of columns in this grid view template.

Declaration

cs-api-definition
public virtual GridViewColumnCollection Columns { get; }

Property Value

GridViewColumnCollection

A GridViewColumnCollection containing the columns.

ContainsColumnExpression

Gets a value indicating if the template contains a column with defined expression.

Declaration

cs-api-definition
[Browsable(false)]
public bool ContainsColumnExpression { get; }

Property Value

bool

CurrentColumn

Gets or sets the column containing the current cell in the grid.

Declaration

cs-api-definition
[Browsable(false)]
public GridViewColumn CurrentColumn { get; set; }

Property Value

GridViewColumn

DataMember

Gets or sets the name of the list or table in the data source for which the GridViewTemplate is displaying data.

Declaration

cs-api-definition
[Browsable(true)]
public string DataMember { get; set; }

Property Value

string

DataSource

Gets or sets the data source that the GridViewTemplate is displaying data for.

Declaration

cs-api-definition
public object DataSource { get; set; }

Property Value

object

DataView

Gets the data view.

Declaration

cs-api-definition
[Browsable(false)]
public RadCollectionView<GridViewRowInfo> DataView { get; }

Property Value

RadCollectionView<GridViewRowInfo>

The data view.

EnableAlternatingRowColor

Gets or sets a value indicating whether alternating row color is enabled.

Declaration

cs-api-definition
[Browsable(true)]
public virtual bool EnableAlternatingRowColor { get; set; }

Property Value

bool

EnableCustomFiltering

Gets or sets a value indicating whether the data can be filtered programmatically.

Declaration

cs-api-definition
[Browsable(true)]
public bool EnableCustomFiltering { get; set; }

Property Value

bool

EnableCustomGrouping

Gets or sets a value indicating whether the data can be grouped programmatically.

Declaration

cs-api-definition
[Browsable(true)]
public bool EnableCustomGrouping { get; set; }

Property Value

bool

EnableCustomSorting

Gets or sets a value indicating whether the data can be sorted programmatically.

Declaration

cs-api-definition
[Browsable(true)]
public bool EnableCustomSorting { get; set; }

Property Value

bool

EnableFiltering

Gets or sets a value indicating whether the data in the current DataView can be filtered.

Declaration

cs-api-definition
[Browsable(true)]
public bool EnableFiltering { get; set; }

Property Value

bool

EnableGrouping

Gets or sets a value indicating whether the data in the current GridViewTemplate can be grouped by users.

Declaration

cs-api-definition
public bool EnableGrouping { get; set; }

Property Value

bool

EnableHierarchyFiltering

Gets or sets a value indicating whether the data can be filtered using parent/child relationship.

Declaration

cs-api-definition
[Browsable(false)]
public bool EnableHierarchyFiltering { get; set; }

Property Value

bool

EnableSorting

Gets or sets a value indicating whether the data can be sorted by the end-users.

Declaration

cs-api-definition
[Browsable(true)]
public bool EnableSorting { get; set; }

Property Value

bool

EventDispatcher

Gets the event dispatcher

Declaration

cs-api-definition
[Browsable(false)]
public virtual EventDispatcher EventDispatcher { get; }

Property Value

EventDispatcher

FilterDescriptors

Gets the filter descriptors.

Declaration

cs-api-definition
[Browsable(true)]
public FilterDescriptorCollection FilterDescriptors { get; }

Property Value

FilterDescriptorCollection

The filter descriptors.

FilterPredicate

Gets or sets the filter predicate used for filtering operation.

Declaration

cs-api-definition
[Browsable(false)]
public Predicate<GridViewRowInfo> FilterPredicate { get; set; }

Property Value

Predicate<GridViewRowInfo>

The filter.

GroupComparer

Gets or sets the group comparer.

Declaration

cs-api-definition
[Browsable(false)]
public IComparer<Group<GridViewRowInfo>> GroupComparer { get; set; }

Property Value

IComparer<Group<GridViewRowInfo>>

The group comparer.

GroupDescriptors

Gets the group descriptors.

Declaration

cs-api-definition
[Browsable(true)]
public GroupDescriptorCollection GroupDescriptors { get; }

Property Value

GroupDescriptorCollection

The group descriptors.

GroupPredicate

Gets or sets the group predicate.

Declaration

cs-api-definition
[Browsable(false)]
public GroupPredicate<GridViewRowInfo> GroupPredicate { get; set; }

Property Value

GroupPredicate<GridViewRowInfo>

The group predicate.

Groups

Gets the groups.

Declaration

cs-api-definition
[Browsable(false)]
public DataGroupCollection Groups { get; }

Property Value

DataGroupCollection

The groups.

HierarchyDataProvider

Gets or sets the hierarchy data provider.

Declaration

cs-api-definition
[Browsable(false)]
public virtual GridViewHierarchyDataProvider HierarchyDataProvider { get; set; }

Property Value

GridViewHierarchyDataProvider

The hierarchy data provider.

HierarchyLevel

Gets the level of nesting for this template.

Declaration

cs-api-definition
[Browsable(false)]
public int HierarchyLevel { get; }

Property Value

int

Implements IHierarchicalRow.HierarchyLevel

HorizontalScrollState

Gets or sets the display state of grid horizontal scrollbars.

Declaration

cs-api-definition
[Browsable(true)]
public ScrollState HorizontalScrollState { get; set; }

Property Value

ScrollState

IsInitialized

Gets a value indicating whether the component is initialized.

Declaration

cs-api-definition
[Browsable(false)]
public bool IsInitialized { get; }

Property Value

bool

Implements ISupportInitializeNotification.IsInitialized

IsSelfReference

Gets a value indicating whether this is self reference relation.

Declaration

cs-api-definition
[Browsable(false)]
public bool IsSelfReference { get; }

Property Value

bool

true if this relation is self reference; otherwise, false.

IsUpdating

Determines whether the template is in a Begin/End update block.

Declaration

cs-api-definition
[Browsable(false)]
public bool IsUpdating { get; }

Property Value

bool

IsVirtualRows

Gets a value indicating whether the ChildRows in hierarchy mode is virtual and hosted outside Rows collection.

Declaration

cs-api-definition
[Browsable(false)]
public bool IsVirtualRows { get; }

Property Value

bool

true if this instance is virtual rows; otherwise, false.

ListSource

Gets the list source.

Declaration

cs-api-definition
[Browsable(false)]
public RadListSource<GridViewRowInfo> ListSource { get; }

Property Value

RadListSource<GridViewRowInfo>

The list source.

MasterTemplate

Gets the root template.

Declaration

cs-api-definition
[Browsable(false)]
public virtual MasterGridViewTemplate MasterTemplate { get; }

Property Value

MasterGridViewTemplate

MasterViewInfo

Gets the master view info.

Declaration

cs-api-definition
[Browsable(false)]
public GridViewInfo MasterViewInfo { get; }

Property Value

GridViewInfo

The master view info.

MergeCellsEditMode

Sets a value indicating how the merged cells will be edited.

Declaration

cs-api-definition
[Browsable(true)]
public MergeCellsEditMode MergeCellsEditMode { get; set; }

Property Value

MergeCellsEditMode

MergeCellsMode

Indicates whether and how the cells will be merged.

Declaration

cs-api-definition
[Browsable(true)]
public MergeCellsMode MergeCellsMode { get; set; }

Property Value

MergeCellsMode

NewRowText

Gets or sets the text displayed in the new row. If this values is null or empty the text from the localization provider will be used.

Declaration

cs-api-definition
[Browsable(true)]
public string NewRowText { get; set; }

Property Value

string

The new row text.

Parent

Gets or sets the parent.

Declaration

cs-api-definition
[Browsable(false)]
public GridViewTemplate Parent { get; }

Property Value

GridViewTemplate

The parent.

PinnedColumns

Gets a readonly collection of GridViewColumn containing the pinned rows in this template.

Declaration

cs-api-definition
[Browsable(false)]
public ReadOnlyCollection<GridViewColumn> PinnedColumns { get; }

Property Value

ReadOnlyCollection<GridViewColumn>

ReadOnly

Gets or sets a value indicating whether the data in this template can be modified

Declaration

cs-api-definition
[Browsable(true)]
public bool ReadOnly { get; set; }

Property Value

bool

RowCount

Gets or sets the number of rows contained in the current GridViewTemplate.

Declaration

cs-api-definition
[Browsable(false)]
public int RowCount { get; set; }

Property Value

int

Rows

Gets the collection of rows in this grid view template.

Declaration

cs-api-definition
[Browsable(false)]
public GridViewRowCollection Rows { get; }

Property Value

GridViewRowCollection

A GridViewRowCollection containing the rows.

SearchRowPosition

Gets or sets a value indicating the location of the search row in the view template.

Declaration

cs-api-definition
[Browsable(true)]
public SystemRowPosition SearchRowPosition { get; set; }

Property Value

SystemRowPosition

SelectLastAddedRow

Gets or sets a value indicating whether the last added row in the RadGridView DataSource will be selected by the control.

Declaration

cs-api-definition
public bool SelectLastAddedRow { get; set; }

Property Value

bool

true if [select last added row]; otherwise, false.

SelectNewRowAsCurrent

This property controls if the new row will be made current if there are no other row in the grid.

Declaration

cs-api-definition
public bool SelectNewRowAsCurrent { get; set; }

Property Value

bool

ShowChildViewCaptions

Gets or sets a value indicating whether to show child view captions.

Declaration

cs-api-definition
[Browsable(true)]
public bool ShowChildViewCaptions { get; set; }

Property Value

bool

ShowCollapsedGroupSummaries

Indicates whether summary rows of collapsed groups will be visible. If true the summary rows will not be hidden when the group is collapsed. Note that the GridViewGroupRowInfo has the same property and it has higher priority. If you need different behavior for different groups/group levels, you can use the CreateRowInfo event and set the ShowCollapsedGroupSummaries of each group individually.

Declaration

cs-api-definition
[Browsable(true)]
public bool ShowCollapsedGroupSummaries { get; set; }

Property Value

bool

ShowColumnHeaders

Gets or sets a value indicating whether the column headers are visible.

Declaration

cs-api-definition
[Browsable(true)]
public bool ShowColumnHeaders { get; set; }

Property Value

bool

ShowFilterCellOperatorText

Gets or sets a value indicating whether the filter operator text should be shown in the filter cell

Declaration

cs-api-definition
[Browsable(true)]
public bool ShowFilterCellOperatorText { get; set; }

Property Value

bool

true if [show filter cell operator text]; otherwise, false.

ShowFilteringRow

Gets or sets a value indicating whether the filtering row should be visible.

Declaration

cs-api-definition
[Browsable(true)]
public bool ShowFilteringRow { get; set; }

Property Value

bool

ShowGroupedColumns

Gets or sets a value indicating whether the columns by which the data is grouped are visible.

Declaration

cs-api-definition
[Browsable(true)]
public bool ShowGroupedColumns { get; set; }

Property Value

bool

Remarks

Set to false, and each column contained in the GroupDescriptors, will get hidden. Set to true to see all columns. If some column is still not visible, check IsVisible.

ShowHeaderCellButtons

Gets or sets a value indicating whether the header cell buttons are visible.

Declaration

cs-api-definition
[Browsable(true)]
public bool ShowHeaderCellButtons { get; set; }

Property Value

bool

ShowParentGroupSummaries

Gets or sets a value indicating whether parent group summary rows are visible in grouping.

Declaration

cs-api-definition
[Browsable(true)]
public bool ShowParentGroupSummaries { get; set; }

Property Value

bool

ShowRowHeaderColumn

Gets or sets a value indicating whether the row header column is visible.

Declaration

cs-api-definition
[Browsable(true)]
public bool ShowRowHeaderColumn { get; set; }

Property Value

bool

ShowSelectColumn

Gets or sets a value indicating whether the select column is visible. The select column in only supported for the GridViewSelectionMode.FullRowSelect.

Declaration

cs-api-definition
[Browsable(true)]
public bool ShowSelectColumn { get; set; }

Property Value

bool

ShowSubTotals

Gets or sets a value indicating whether summary rows will be shown for each group. The property is only relevant when the grid is grouped.

Declaration

cs-api-definition
[Browsable(true)]
public bool ShowSubTotals { get; set; }

Property Value

bool

ShowTotals

Gets or sets a value indicating whether total summary rows are visible in grouping.

Declaration

cs-api-definition
[Browsable(true)]
public bool ShowTotals { get; set; }

Property Value

bool

SortComparer

Gets or sets the sort comparer.

Declaration

cs-api-definition
[Browsable(false)]
public IComparer<GridViewRowInfo> SortComparer { get; set; }

Property Value

IComparer<GridViewRowInfo>

The sort comparer.

SortDescriptors

Gets the sort descriptors.

Declaration

cs-api-definition
[Browsable(true)]
public SortDescriptorCollection SortDescriptors { get; }

Property Value

SortDescriptorCollection

The sort descriptors.

SummaryRowGroupHeaders

Gets the collection containing the summary items placed in the group header.

Declaration

cs-api-definition
[Browsable(false)]
public GridViewSummaryRowItemCollection SummaryRowGroupHeaders { get; }

Property Value

GridViewSummaryRowItemCollection

SummaryRowsBottom

Gets the collection containing summary rows placed at the bottom of each DataGroup.

Declaration

cs-api-definition
[Browsable(true)]
public GridViewSummaryRowItemCollection SummaryRowsBottom { get; }

Property Value

GridViewSummaryRowItemCollection

SummaryRowsTop

Gets the collection containing summary rows placed on top of each DataGroup.

Declaration

cs-api-definition
[Browsable(true)]
public GridViewSummaryRowItemCollection SummaryRowsTop { get; }

Property Value

GridViewSummaryRowItemCollection

Tag

Gets or sets the tag.

Declaration

cs-api-definition
[Bindable(true)]
[TypeConverter(typeof(StringConverter))]
public object Tag { get; set; }

Property Value

object

The tag.

Templates

Gets the collection of child grid view templates.

Declaration

cs-api-definition
[Browsable(true)]
public GridViewTemplateCollection Templates { get; }

Property Value

GridViewTemplateCollection

A GridViewTemplateCollection containing the child templates.

UseCheckboxRowSelectionOnly

Gets or sets a value indicating whether users can select rows only via the selection checkboxes.

Declaration

cs-api-definition
[Browsable(true)]
public bool UseCheckboxRowSelectionOnly { get; set; }

Property Value

bool

true if checkbox-only row selection is enabled; otherwise, false.

Remarks

This property will only be considered if ShowSelectColumn is true.

VerticalScrollState

Gets or sets the display state of grid vertical scrollbars.

Declaration

cs-api-definition
[Browsable(true)]
public ScrollState VerticalScrollState { get; set; }

Property Value

ScrollState

ViewDefinition

Gets or sets the IGridViewDefinition associated with this template.

Declaration

cs-api-definition
[Browsable(false)]
public IGridViewDefinition ViewDefinition { get; set; }

Property Value

IGridViewDefinition

Methods

AnalyzeQueueCore(List<GridViewEvent>)

Analyzes a queue of grid view events.

Declaration

cs-api-definition
protected virtual bool AnalyzeQueueCore(List<GridViewEvent> events)

Parameters

events

List<GridViewEvent>

The list of events to analyze.

Returns

bool

true if the queue was analyzed successfully; otherwise, false.

BeginInit()

Begins initialization of the view template.

Declaration

cs-api-definition
public virtual void BeginInit()

Implements ISupportInitialize.BeginInit()

BeginUpdate()

Begins an update block to defer notifications and improve performance during bulk operations.

Declaration

cs-api-definition
public virtual void BeginUpdate()

BestFitColumns()

Automatically adjusts the width of all columns to fit their content.

Declaration

cs-api-definition
public void BestFitColumns()

BestFitColumns(BestFitColumnMode)

Automatically adjusts the width of all columns to fit their content using the specified mode.

Declaration

cs-api-definition
public void BestFitColumns(BestFitColumnMode mode)

Parameters

mode

BestFitColumnMode

The best fit mode to use for column sizing.

ClearAllSummariesFromGroups()

Clears all summaries from groups.

Declaration

cs-api-definition
protected virtual void ClearAllSummariesFromGroups()

CollapseAll()

Collapses all expandable rows.

Declaration

cs-api-definition
public void CollapseAll()

CollapseAllGroups()

Collapses all group rows when data is grouped.

Declaration

cs-api-definition
public void CollapseAllGroups()

CreateBindingContext()

Creates the binding context for this grid view template.

Declaration

cs-api-definition
protected virtual BindingContext CreateBindingContext()

Returns

BindingContext

A new instance of BindingContext.

CreateListSource()

Creates the list source for this grid view template.

Declaration

cs-api-definition
protected virtual GridViewListSource CreateListSource()

Returns

GridViewListSource

A new instance of GridViewListSource.

DeferRefresh()

Defers refresh operations until the returned IDisposable is disposed.

Declaration

cs-api-definition
public virtual IDisposable DeferRefresh()

Returns

IDisposable

An IDisposable that ends the defer refresh when disposed.

DispatchEvent(GridViewEvent)

Dispatches the event.

Declaration

cs-api-definition
protected virtual void DispatchEvent(GridViewEvent gridEvent)

Parameters

gridEvent

GridViewEvent

The grid event.

DispatchEvent(GridViewEvent, bool)

Dispatches the event.

Declaration

cs-api-definition
protected virtual void DispatchEvent(GridViewEvent gridEvent, bool postUI)

Parameters

gridEvent

GridViewEvent

The grid event.

postUI

bool

The post UI.

Dispose(bool)

Releases the unmanaged resources used by the Component and optionally releases the managed resources.

Declaration

cs-api-definition
protected override void Dispose(bool disposing)

Parameters

disposing

bool

true to release both managed and unmanaged resources; false to release only unmanaged resources.

Overrides Component.Dispose(bool)

EndInit()

Ends view template initialization.

Declaration

cs-api-definition
public virtual void EndInit()

Implements ISupportInitialize.EndInit()

EndUpdate()

Ends the update block and triggers notifications.

Declaration

cs-api-definition
public void EndUpdate()

EndUpdate(DataViewChangedEventArgs)

Ends the update block and triggers notifications with the specified event arguments.

Declaration

cs-api-definition
public void EndUpdate(DataViewChangedEventArgs e)

Parameters

e

DataViewChangedEventArgs

The event arguments describing the view changes.

EndUpdate(bool)

Ends the update block with the option to control notifications.

Declaration

cs-api-definition
public void EndUpdate(bool notify)

Parameters

notify

bool

If set to true, triggers change notifications.

EndUpdate(bool, DataViewChangedEventArgs)

Ends the update block with control over notifications and specific event arguments.

Declaration

cs-api-definition
public virtual void EndUpdate(bool notify, DataViewChangedEventArgs e)

Parameters

notify

bool

If set to true, triggers change notifications.

e

DataViewChangedEventArgs

The event arguments describing the view changes.

EnsureHierarchyProvider()

Resets the hierarchy data provider.

Declaration

cs-api-definition
protected virtual void EnsureHierarchyProvider()

EnsureRowType(GridViewTemplate)

Ensures the type of the row.

Declaration

cs-api-definition
protected virtual void EnsureRowType(GridViewTemplate gridViewTemplate)

Parameters

gridViewTemplate

GridViewTemplate

The grid view template.

ExpandAll()

Expands all expandable rows.

Declaration

cs-api-definition
public void ExpandAll()

ExpandAllGroups()

Expands all group rows when data is grouped.

Declaration

cs-api-definition
public void ExpandAllGroups()

GetDefaultCurrentRow(GridViewTemplate, GridViewInfo, bool)

Declaration

cs-api-definition
protected virtual GridViewRowInfo GetDefaultCurrentRow(GridViewTemplate template, GridViewInfo viewInfo, bool checkItemCount)

Parameters

template

GridViewTemplate

viewInfo

GridViewInfo

checkItemCount

bool

Returns

GridViewRowInfo

GetEventListenerPirotiy()

Gets the event listener priority for this template.

Declaration

cs-api-definition
protected virtual EventListenerPriority GetEventListenerPirotiy()

Returns

EventListenerPriority

An EventListenerPriority value indicating the priority.

GetEventProcessMode()

Gets the event processing mode for this template.

Declaration

cs-api-definition
protected virtual GridEventProcessMode GetEventProcessMode()

Returns

GridEventProcessMode

A GridEventProcessMode value indicating the processing mode.

LoadFrom(IDataReader)

Loads data from an IDataReader and resets the current data source.

Declaration

cs-api-definition
public void LoadFrom(IDataReader dataReader)

Parameters

dataReader

IDataReader

The data reader to load data from.

NotifyRowExpanded()

This method is used to notify the template, that a row is expanded, while event dispatch is suspended.

Declaration

cs-api-definition
public virtual void NotifyRowExpanded()

OnBindingContextChanged(EventArgs)

Raises the event.

Declaration

cs-api-definition
protected virtual void OnBindingContextChanged(EventArgs e)

Parameters

e

EventArgs

The EventArgs instance containing the event data.

OnCreateRowInfo(GridViewCreateRowInfoEventArgs)

Raises the event.

Declaration

cs-api-definition
protected virtual void OnCreateRowInfo(GridViewCreateRowInfoEventArgs e)

Parameters

e

GridViewCreateRowInfoEventArgs

The GridViewCreateRowInfoEventArgs instance containing the event data.

OnNotifyPropertyChanged(PropertyChangedEventArgs)

Raises the PropertyChanged event.

Declaration

cs-api-definition
protected virtual void OnNotifyPropertyChanged(PropertyChangedEventArgs e)

Parameters

e

PropertyChangedEventArgs

The event arguments containing the property change information.

OnNotifyPropertyChanged(string)

Raises the PropertyChanged event for the specified property.

Declaration

cs-api-definition
protected virtual void OnNotifyPropertyChanged(string propertyName)

Parameters

propertyName

string

The name of the property that changed.

OnPropertyChanging(PropertyChangingEventArgsEx)

Raises the PropertyChanging event. Note: This method is called even when the notifications are suspended.

Declaration

cs-api-definition
protected virtual void OnPropertyChanging(PropertyChangingEventArgsEx e)

Parameters

e

PropertyChangingEventArgsEx

A PropertyChangingEventArgsEx instance containing event data.

OnPropertyChanging(string)

Raises the PropertyChanging event for the specified property.

Declaration

cs-api-definition
protected virtual bool OnPropertyChanging(string propertyName)

Parameters

propertyName

string

The name of the property that is changing.

Returns

bool

true if the property change should proceed; otherwise, false.

OnViewChanged(DataViewChangedEventArgs)

Raises the event.

Declaration

cs-api-definition
protected void OnViewChanged(DataViewChangedEventArgs e)

Parameters

e

DataViewChangedEventArgs

The DataViewChangedEventArgs instance containing the event data.

OnViewChanged(object, DataViewChangedEventArgs)

Called when the view is changed.

Declaration

cs-api-definition
protected virtual void OnViewChanged(object sender, DataViewChangedEventArgs e)

Parameters

sender

object

The sender.

e

DataViewChangedEventArgs

The DataViewChangedEventArgs instance containing the event data.

PostProcessEventCore(GridViewEvent)

Post-processes a grid view event.

Declaration

cs-api-definition
protected virtual GridViewEventResult PostProcessEventCore(GridViewEvent eventData)

Parameters

eventData

GridViewEvent

The event data to process.

Returns

GridViewEventResult

A GridViewEventResult indicating the result of the processing.

PreProcessEventCore(GridViewEvent)

Pre-processes a grid view event.

Declaration

cs-api-definition
protected virtual GridViewEventResult PreProcessEventCore(GridViewEvent eventData)

Parameters

eventData

GridViewEvent

The event data to pre-process.

Returns

GridViewEventResult

A GridViewEventResult indicating the result of the pre-processing.

ProcessColumnPropertyChangedEvent(GridViewColumn, RadPropertyChangedEventArgs)

Processes a column property changed event.

Declaration

cs-api-definition
protected virtual GridViewEventResult ProcessColumnPropertyChangedEvent(GridViewColumn column, RadPropertyChangedEventArgs e)

Parameters

column

GridViewColumn

The column whose property changed.

e

RadPropertyChangedEventArgs

The event arguments containing property change information.

Returns

GridViewEventResult

A GridViewEventResult indicating the result of the processing.

ProcessEventCore(GridViewEvent)

Processes a grid view event.

Declaration

cs-api-definition
protected virtual GridViewEventResult ProcessEventCore(GridViewEvent eventData)

Parameters

eventData

GridViewEvent

The event data to process.

Returns

GridViewEventResult

A GridViewEventResult indicating the result of the processing.

Refresh()

Refreshes the grid view template by reloading data and updating the display.

Declaration

cs-api-definition
public virtual void Refresh()

Refresh(params GridViewColumn[])

Refreshes the grid view template with data changes for the specified columns.

Declaration

cs-api-definition
public virtual void Refresh(params GridViewColumn[] affectedColumns)

Parameters

affectedColumns

GridViewColumn[]

The columns that have been affected by data changes.

ResetCurrentColumn()

Resets the current column.

Declaration

cs-api-definition
protected virtual void ResetCurrentColumn()

ResetCurrentRow()

Resets the current row.

Declaration

cs-api-definition
protected virtual void ResetCurrentRow()

ResumeEvent(KnownEvents)

Resumes the event.

Declaration

cs-api-definition
protected virtual void ResumeEvent(KnownEvents eventId)

Parameters

eventId

KnownEvents

The event id.

SetEnableAlternatingRowColor(bool)

Sets whether the alternating row color is enabled.

Declaration

cs-api-definition
protected virtual void SetEnableAlternatingRowColor(bool value)

Parameters

value

bool

The value.

SetError(GridViewCellCancelEventArgs, Exception)

Sets an error for a grid view cell with the specified exception.

Declaration

cs-api-definition
public void SetError(GridViewCellCancelEventArgs e, Exception exception)

Parameters

e

GridViewCellCancelEventArgs

The GridViewCellCancelEventArgs instance containing the event data.

exception

Exception

The exception that occurred.

SetError(GridViewCellCancelEventArgs, string)

Sets an error for a grid view cell with the specified message.

Declaration

cs-api-definition
public void SetError(GridViewCellCancelEventArgs e, string message)

Parameters

e

GridViewCellCancelEventArgs

The GridViewCellCancelEventArgs instance containing the event data.

message

string

The error message.

SetError(GridViewDataErrorEventArgs)

Sets an error using the specified data error event arguments.

Declaration

cs-api-definition
public void SetError(GridViewDataErrorEventArgs e)

Parameters

e

GridViewDataErrorEventArgs

The GridViewDataErrorEventArgs containing error information.

SetProperty<T>(string, ref T, T)

General method for setting the value of the field related to the property that is modified. This method confirms that the old and new values are different, then fires the PropertyChanging event, then sets the given value to the supplied field, and fires the PropertyChanged event. Note: If the PropertyChanging event is canceled, the last two actions are not performed.

Declaration

cs-api-definition
protected virtual bool SetProperty<T>(string propertyName, ref T propertyField, T value)

Parameters

propertyName

string

The name of the property, that will appear as propertyName in the PropertyChanging and PropertyChanged event args.

propertyField

T

The field, that is related to the property.

value

T

The value that is to be set to the field in case the PropertyChanging event is not being Cancel.

Returns

bool

true if new value is being set

Example

csharp
public class MyNotificationsTest : NotifyPropertyBase
{
    private int myInt = 0;
    private int myInt2 = 0; //

    public int AsInt
    {
       get 
       { 
          return this.myField; 
       }
       set
       {
          if (SetProperty("AsInt", ref this.myInt, value))
          {
             // perform additional actions when new value is set to myInt.
          }
       }
    }

    public int AsInt2
    {
       get 
       { 
          return (float)this.myInt2; 
       }
       set
       {
          // The following property setter is the same as the previous one.
          if (this.myInt2 != value) 
          {
              PropertyChangingEventArgs2 ea = new PropertyChangingEventArgs2("AsInt2", value);
              OnPropertyChanging(ea);

              if (!ea.Cancel)
              {
                 this.myInt2 = (int)ea.Value;
                 OnPropertyChanged("AsInt2");

                 // perform additional actions when new value is set to myInt2.
              }
           }
       }
    }
}

SuspendEvent(KnownEvents)

Suspends the event.

Declaration

cs-api-definition
protected virtual void SuspendEvent(KnownEvents eventId)

Parameters

eventId

KnownEvents

The event id.

UnwireEvents()

Unwires event handlers for the template's internal events.

Declaration

cs-api-definition
protected virtual void UnwireEvents()

WireEvents()

Wires up event handlers for the template's internal events.

Declaration

cs-api-definition
protected virtual void WireEvents()

Events

BindingContextChanged

Occurs when the binding context has changed.

Declaration

cs-api-definition
public event EventHandler BindingContextChanged

Event Value

EventHandler

Implements IDataItemSource.BindingContextChanged

CreateRowInfo

Occurs when the instance of GridViewRowInfo is created.

Declaration

cs-api-definition
public event GridViewCreateRowInfoEventHandler CreateRowInfo

Event Value

GridViewCreateRowInfoEventHandler

Initialized

Occurs when initialization of the component is completed.

Declaration

cs-api-definition
[Browsable(false)]
public event EventHandler Initialized

Event Value

EventHandler

Implements ISupportInitializeNotification.Initialized

PropertyChanged

Occurs when a property value has changed.

Declaration

cs-api-definition
public event PropertyChangedEventHandler PropertyChanged

Event Value

PropertyChangedEventHandler

Implements INotifyPropertyChanged.PropertyChanged

PropertyChanging

Occurs when a property value is changing.

Declaration

cs-api-definition
public event PropertyChangingEventHandlerEx PropertyChanging

Event Value

PropertyChangingEventHandlerEx

Implements INotifyPropertyChangingEx.PropertyChanging

ViewChanged

Occurs when the view is changed.

Declaration

cs-api-definition
public event DataViewChangedEventHandler ViewChanged

Event Value

DataViewChangedEventHandler

In this article
DefinitionConstructorsGridViewTemplate()PropertiesAddNewRowPositionAllowAddNewRowAllowAutoSizeColumnsAllowCellContextMenuAllowColumnChooserAllowColumnHeaderContextMenuAllowColumnReorderAllowColumnResizeAllowDeleteRowAllowDragToGroupAllowEditRowAllowMultiColumnSortingAllowRowHeaderContextMenuAllowRowReorderAllowRowResizeAllowSearchRowAutoExpandGroupsAutoGenerateColumnsAutoSizeColumnsModeAutoUpdateObjectRelationalSourceBindingContextBottomPinnedRowsModeCaptionCaseSensitiveChildRowsChildViewTabsPositionColumnCountColumnsContainsColumnExpressionCurrentColumnDataMemberDataSourceDataViewEnableAlternatingRowColorEnableCustomFilteringEnableCustomGroupingEnableCustomSortingEnableFilteringEnableGroupingEnableHierarchyFilteringEnableSortingEventDispatcherFilterDescriptorsFilterPredicateGroupComparerGroupDescriptorsGroupPredicateGroupsHierarchyDataProviderHierarchyLevelHorizontalScrollStateIsInitializedIsSelfReferenceIsUpdatingIsVirtualRowsListSourceMasterTemplateMasterViewInfoMergeCellsEditModeMergeCellsModeNewRowTextParentPinnedColumnsReadOnlyRowCountRowsSearchRowPositionSelectLastAddedRowSelectNewRowAsCurrentShowChildViewCaptionsShowCollapsedGroupSummariesShowColumnHeadersShowFilterCellOperatorTextShowFilteringRowShowGroupedColumnsShowHeaderCellButtonsShowParentGroupSummariesShowRowHeaderColumnShowSelectColumnShowSubTotalsShowTotalsSortComparerSortDescriptorsSummaryRowGroupHeadersSummaryRowsBottomSummaryRowsTopTagTemplatesUseCheckboxRowSelectionOnlyVerticalScrollStateViewDefinitionMethodsAnalyzeQueueCore(List<GridViewEvent>)BeginInit()BeginUpdate()BestFitColumns()BestFitColumns(BestFitColumnMode)ClearAllSummariesFromGroups()CollapseAll()CollapseAllGroups()CreateBindingContext()CreateListSource()DeferRefresh()DispatchEvent(GridViewEvent)DispatchEvent(GridViewEvent, bool)Dispose(bool)EndInit()EndUpdate()EndUpdate(DataViewChangedEventArgs)EndUpdate(bool)EndUpdate(bool, DataViewChangedEventArgs)EnsureHierarchyProvider()EnsureRowType(GridViewTemplate)ExpandAll()ExpandAllGroups()GetDefaultCurrentRow(GridViewTemplate, GridViewInfo, bool)GetEventListenerPirotiy()GetEventProcessMode()LoadFrom(IDataReader)NotifyRowExpanded()OnBindingContextChanged(EventArgs)OnCreateRowInfo(GridViewCreateRowInfoEventArgs)OnNotifyPropertyChanged(PropertyChangedEventArgs)OnNotifyPropertyChanged(string)OnPropertyChanging(PropertyChangingEventArgsEx)OnPropertyChanging(string)OnViewChanged(DataViewChangedEventArgs)OnViewChanged(object, DataViewChangedEventArgs)PostProcessEventCore(GridViewEvent)PreProcessEventCore(GridViewEvent)ProcessColumnPropertyChangedEvent(GridViewColumn, RadPropertyChangedEventArgs)ProcessEventCore(GridViewEvent)Refresh()Refresh(params GridViewColumn[])ResetCurrentColumn()ResetCurrentRow()ResumeEvent(KnownEvents)SetEnableAlternatingRowColor(bool)SetError(GridViewCellCancelEventArgs, Exception)SetError(GridViewCellCancelEventArgs, string)SetError(GridViewDataErrorEventArgs)SetProperty<T>(string, ref T, T)SuspendEvent(KnownEvents)UnwireEvents()WireEvents()EventsBindingContextChangedCreateRowInfoInitializedPropertyChangedPropertyChangingViewChanged
Not finding the help you need?
Contact Support