ClassGridViewTemplate
This component represents a customizable view template for displaying flat tabular data.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.GridView.dll
Syntax:
public class GridViewTemplate : Component, IComponent, IDisposable, IDataItemSource, IHierarchicalRow, INotifyPropertyChangingEx, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IGridViewEventListener
Inheritance: objectMarshalByRefObjectComponentGridViewTemplate
Derived Classes:
Implements:
Inherited Members
Constructors
GridViewTemplate()
Initializes a new instance of the GridViewTemplate class.
Declaration
public GridViewTemplate()
Properties
AddNewRowPosition
Gets or sets a value indicating the location of the new row in the view template.
Declaration
[Browsable(true)]
public SystemRowPosition AddNewRowPosition { get; set; }
Property Value
AllowAddNewRow
Gets or sets a value indicating whether the user can add new rows through the grid.
Declaration
[Browsable(true)]
public bool AllowAddNewRow { get; set; }
Property Value
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
[Browsable(false)]
public bool AllowAutoSizeColumns { get; set; }
Property Value
AllowCellContextMenu
Gets or sets a value indicating whether context menu is displayed when user right clicks on a data cell.
Declaration
[Browsable(true)]
public bool AllowCellContextMenu { get; set; }
Property Value
AllowColumnChooser
Gets or sets a value indicating whether GridViewColumnChooser is available to the user for this instance of GridViewTemplate.
Declaration
[Browsable(true)]
public bool AllowColumnChooser { get; set; }
Property Value
AllowColumnHeaderContextMenu
Gets or sets a value indicating whether context menu is displayed when user right-clicks on a column header.
Declaration
[Browsable(true)]
public bool AllowColumnHeaderContextMenu { get; set; }
Property Value
AllowColumnReorder
Gets or sets a value indicating whether user can reorder Columns.
Declaration
[Browsable(true)]
public bool AllowColumnReorder { get; set; }
Property Value
AllowColumnResize
Gets or sets a value indicating whether user can resize columns.
AllowDeleteRow
Gets or sets a value indicating whether user can delete rows.
Declaration
[Browsable(true)]
public bool AllowDeleteRow { get; set; }
Property Value
AllowDragToGroup
Gets or sets a value indicating whether user can drag a column header to grouping panel.
Declaration
[Browsable(true)]
public bool AllowDragToGroup { get; set; }
Property Value
AllowEditRow
Gets or sets a value indicating whether user can edit rows.
Declaration
[Browsable(true)]
public bool AllowEditRow { get; set; }
Property Value
AllowMultiColumnSorting
Gets or sets a value indicating whether the end-user can sort by more than one column.
Declaration
[Browsable(true)]
public bool AllowMultiColumnSorting { get; set; }
Property Value
AllowRowHeaderContextMenu
Gets or sets a value indicating whether context menu is displayed when user right clicks on a row header.
Declaration
[Browsable(true)]
public bool AllowRowHeaderContextMenu { get; set; }
Property Value
AllowRowReorder
Gets or sets a value indicating whether the user is able to reorder rows in the grid
Declaration
[Browsable(true)]
public bool AllowRowReorder { get; set; }
Property Value
AllowRowResize
Gets or sets a value indicating whether user can resize a row.
AllowSearchRow
Gets or sets a value indicating whether the user can search in the data contained in the grid.
Declaration
[Browsable(true)]
public bool AllowSearchRow { get; set; }
Property Value
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
[Browsable(true)]
public bool AutoExpandGroups { get; set; }
Property Value
AutoGenerateColumns
Gets or sets a value indicating whether columns are created automatically when the or properties are set.
Declaration
[Browsable(true)]
public bool AutoGenerateColumns { get; set; }
Property Value
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
[Browsable(true)]
public GridViewAutoSizeColumnsMode AutoSizeColumnsMode { get; set; }
Property Value
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
[Browsable(true)]
public bool AutoUpdateObjectRelationalSource { get; set; }
Property Value
BindingContext
Gets or sets the binding context for data binding operations.
Declaration
[Browsable(false)]
public BindingContext BindingContext { get; }
Property Value
The BindingContext used for data binding.
Implements
BottomPinnedRowsMode
Gets or sets a value indicating how bottom pinned rows are laid out.
Declaration
[Browsable(true)]
public GridViewBottomPinnedRowsMode BottomPinnedRowsMode { get; set; }
Property Value
Caption
Gets or sets the caption text.
Declaration
[Browsable(true)]
public string Caption { get; set; }
Property Value
CaseSensitive
Indicates whether string comparisons of data are case-sensitive.
Declaration
[Browsable(true)]
public bool CaseSensitive { get; set; }
Property Value
ChildRows
Gets the collection of child rows for this grid view template.
Declaration
[Browsable(false)]
public GridViewChildRowCollection ChildRows { get; }
Property Value
A GridViewChildRowCollection containing the child rows.
Implements
ChildViewTabsPosition
Gets or sets the position to place tabs for child views related with this template.
Declaration
[Browsable(true)]
public TabPositions ChildViewTabsPosition { get; set; }
Property Value
ColumnCount
Gets or sets the number of columns displayed in the current GridViewTemplate.
Declaration
[Browsable(false)]
public int ColumnCount { get; set; }
Property Value
Columns
Gets the collection of columns in this grid view template.
Declaration
public virtual GridViewColumnCollection Columns { get; }
Property Value
A GridViewColumnCollection containing the columns.
ContainsColumnExpression
Gets a value indicating if the template contains a column with defined expression.
Declaration
[Browsable(false)]
public bool ContainsColumnExpression { get; }
Property Value
CurrentColumn
Gets or sets the column containing the current cell in the grid.
Declaration
[Browsable(false)]
public GridViewColumn CurrentColumn { get; set; }
Property Value
DataMember
Gets or sets the name of the list or table in the data source for which the GridViewTemplate is displaying data.
Declaration
[Browsable(true)]
public string DataMember { get; set; }
Property Value
DataSource
Gets or sets the data source that the GridViewTemplate is displaying data for.
DataView
Gets the data view.
Declaration
[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
[Browsable(true)]
public virtual bool EnableAlternatingRowColor { get; set; }
Property Value
EnableCustomFiltering
Gets or sets a value indicating whether the data can be filtered programmatically.
Declaration
[Browsable(true)]
public bool EnableCustomFiltering { get; set; }
Property Value
EnableCustomGrouping
Gets or sets a value indicating whether the data can be grouped programmatically.
Declaration
[Browsable(true)]
public bool EnableCustomGrouping { get; set; }
Property Value
EnableCustomSorting
Gets or sets a value indicating whether the data can be sorted programmatically.
Declaration
[Browsable(true)]
public bool EnableCustomSorting { get; set; }
Property Value
EnableFiltering
Gets or sets a value indicating whether the data in the current DataView can be filtered.
Declaration
[Browsable(true)]
public bool EnableFiltering { get; set; }
Property Value
EnableGrouping
Gets or sets a value indicating whether the data in the current GridViewTemplate can be grouped by users.
EnableHierarchyFiltering
Gets or sets a value indicating whether the data can be filtered using parent/child relationship.
Declaration
[Browsable(false)]
public bool EnableHierarchyFiltering { get; set; }
Property Value
EnableSorting
Gets or sets a value indicating whether the data can be sorted by the end-users.
Declaration
[Browsable(true)]
public bool EnableSorting { get; set; }
Property Value
EventDispatcher
Gets the event dispatcher
Declaration
[Browsable(false)]
public virtual EventDispatcher EventDispatcher { get; }
Property Value
FilterDescriptors
Gets the filter descriptors.
Declaration
[Browsable(true)]
public FilterDescriptorCollection FilterDescriptors { get; }
Property Value
The filter descriptors.
FilterPredicate
Gets or sets the filter predicate used for filtering operation.
Declaration
[Browsable(false)]
public Predicate<GridViewRowInfo> FilterPredicate { get; set; }
Property Value
The filter.
GroupComparer
Gets or sets the group comparer.
Declaration
[Browsable(false)]
public IComparer<Group<GridViewRowInfo>> GroupComparer { get; set; }
Property Value
IComparer<Group<GridViewRowInfo>>
The group comparer.
GroupDescriptors
Gets the group descriptors.
Declaration
[Browsable(true)]
public GroupDescriptorCollection GroupDescriptors { get; }
Property Value
The group descriptors.
GroupPredicate
Gets or sets the group predicate.
Declaration
[Browsable(false)]
public GroupPredicate<GridViewRowInfo> GroupPredicate { get; set; }
Property Value
GroupPredicate<GridViewRowInfo>
The group predicate.
Groups
Gets the groups.
Declaration
[Browsable(false)]
public DataGroupCollection Groups { get; }
Property Value
The groups.
HierarchyDataProvider
Gets or sets the hierarchy data provider.
Declaration
[Browsable(false)]
public virtual GridViewHierarchyDataProvider HierarchyDataProvider { get; set; }
Property Value
The hierarchy data provider.
HierarchyLevel
Gets the level of nesting for this template.
Declaration
[Browsable(false)]
public int HierarchyLevel { get; }
Property Value
Implements
HorizontalScrollState
Gets or sets the display state of grid horizontal scrollbars.
Declaration
[Browsable(true)]
public ScrollState HorizontalScrollState { get; set; }
Property Value
IsInitialized
Gets a value indicating whether the component is initialized.
Declaration
[Browsable(false)]
public bool IsInitialized { get; }
Property Value
Implements
IsSelfReference
Gets a value indicating whether this is self reference relation.
Declaration
[Browsable(false)]
public bool IsSelfReference { get; }
Property Value
true if this relation is self reference; otherwise, false.
IsUpdating
Determines whether the template is in a Begin/End update block.
Declaration
[Browsable(false)]
public bool IsUpdating { get; }
Property Value
IsVirtualRows
Gets a value indicating whether the ChildRows in hierarchy mode is virtual and hosted outside Rows collection.
Declaration
[Browsable(false)]
public bool IsVirtualRows { get; }
Property Value
true if this instance is virtual rows; otherwise, false.
ListSource
Gets the list source.
Declaration
[Browsable(false)]
public RadListSource<GridViewRowInfo> ListSource { get; }
Property Value
RadListSource<GridViewRowInfo>
The list source.
MasterTemplate
Gets the root template.
Declaration
[Browsable(false)]
public virtual MasterGridViewTemplate MasterTemplate { get; }
Property Value
MasterViewInfo
Gets the master view info.
Declaration
[Browsable(false)]
public GridViewInfo MasterViewInfo { get; }
Property Value
The master view info.
MergeCellsEditMode
Sets a value indicating how the merged cells will be edited.
Declaration
[Browsable(true)]
public MergeCellsEditMode MergeCellsEditMode { get; set; }
Property Value
MergeCellsMode
Indicates whether and how the cells will be merged.
Declaration
[Browsable(true)]
public MergeCellsMode MergeCellsMode { get; set; }
Property Value
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
[Browsable(true)]
public string NewRowText { get; set; }
Property Value
The new row text.
Parent
Gets or sets the parent.
Declaration
[Browsable(false)]
public GridViewTemplate Parent { get; }
Property Value
The parent.
PinnedColumns
Gets a readonly collection of GridViewColumn containing the pinned rows in this template.
Declaration
[Browsable(false)]
public ReadOnlyCollection<GridViewColumn> PinnedColumns { get; }
Property Value
ReadOnly
Gets or sets a value indicating whether the data in this template can be modified
Declaration
[Browsable(true)]
public bool ReadOnly { get; set; }
Property Value
RowCount
Gets or sets the number of rows contained in the current GridViewTemplate.
Declaration
[Browsable(false)]
public int RowCount { get; set; }
Property Value
Rows
Gets the collection of rows in this grid view template.
Declaration
[Browsable(false)]
public GridViewRowCollection Rows { get; }
Property Value
A GridViewRowCollection containing the rows.
SearchRowPosition
Gets or sets a value indicating the location of the search row in the view template.
Declaration
[Browsable(true)]
public SystemRowPosition SearchRowPosition { get; set; }
Property Value
SelectLastAddedRow
Gets or sets a value indicating whether the last added row in the RadGridView DataSource will be selected by the control.
Declaration
public bool SelectLastAddedRow { get; set; }
Property Value
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.
ShowChildViewCaptions
Gets or sets a value indicating whether to show child view captions.
Declaration
[Browsable(true)]
public bool ShowChildViewCaptions { get; set; }
Property Value
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
[Browsable(true)]
public bool ShowCollapsedGroupSummaries { get; set; }
Property Value
ShowColumnHeaders
Gets or sets a value indicating whether the column headers are visible.
Declaration
[Browsable(true)]
public bool ShowColumnHeaders { get; set; }
Property Value
ShowFilterCellOperatorText
Gets or sets a value indicating whether the filter operator text should be shown in the filter cell
Declaration
[Browsable(true)]
public bool ShowFilterCellOperatorText { get; set; }
Property Value
true if [show filter cell operator text]; otherwise, false.
ShowFilteringRow
Gets or sets a value indicating whether the filtering row should be visible.
Declaration
[Browsable(true)]
public bool ShowFilteringRow { get; set; }
Property Value
ShowGroupedColumns
Gets or sets a value indicating whether the columns by which the data is grouped are visible.
Declaration
[Browsable(true)]
public bool ShowGroupedColumns { get; set; }
Property Value
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
[Browsable(true)]
public bool ShowHeaderCellButtons { get; set; }
Property Value
ShowParentGroupSummaries
Gets or sets a value indicating whether parent group summary rows are visible in grouping.
Declaration
[Browsable(true)]
public bool ShowParentGroupSummaries { get; set; }
Property Value
ShowRowHeaderColumn
Gets or sets a value indicating whether the row header column is visible.
Declaration
[Browsable(true)]
public bool ShowRowHeaderColumn { get; set; }
Property Value
ShowSelectColumn
Gets or sets a value indicating whether the select column is visible. The select column in only supported for the GridViewSelectionMode.FullRowSelect.
Declaration
[Browsable(true)]
public bool ShowSelectColumn { get; set; }
Property Value
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
[Browsable(true)]
public bool ShowSubTotals { get; set; }
Property Value
ShowTotals
Gets or sets a value indicating whether total summary rows are visible in grouping.
Declaration
[Browsable(true)]
public bool ShowTotals { get; set; }
Property Value
SortComparer
Gets or sets the sort comparer.
Declaration
[Browsable(false)]
public IComparer<GridViewRowInfo> SortComparer { get; set; }
Property Value
IComparer<GridViewRowInfo>
The sort comparer.
SortDescriptors
Gets the sort descriptors.
Declaration
[Browsable(true)]
public SortDescriptorCollection SortDescriptors { get; }
Property Value
The sort descriptors.
SummaryRowGroupHeaders
Gets the collection containing the summary items placed in the group header.
Declaration
[Browsable(false)]
public GridViewSummaryRowItemCollection SummaryRowGroupHeaders { get; }
Property Value
SummaryRowsBottom
Gets the collection containing summary rows placed at the bottom of each DataGroup.
Declaration
[Browsable(true)]
public GridViewSummaryRowItemCollection SummaryRowsBottom { get; }
Property Value
SummaryRowsTop
Gets the collection containing summary rows placed on top of each DataGroup.
Declaration
[Browsable(true)]
public GridViewSummaryRowItemCollection SummaryRowsTop { get; }
Property Value
Tag
Gets or sets the tag.
Declaration
[Bindable(true)]
[TypeConverter(typeof(StringConverter))]
public object Tag { get; set; }
Property Value
The tag.
Templates
Gets the collection of child grid view templates.
Declaration
[Browsable(true)]
public GridViewTemplateCollection Templates { get; }
Property Value
A GridViewTemplateCollection containing the child templates.
UseCheckboxRowSelectionOnly
Gets or sets a value indicating whether users can select rows only via the selection checkboxes.
Declaration
[Browsable(true)]
public bool UseCheckboxRowSelectionOnly { get; set; }
Property Value
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
[Browsable(true)]
public ScrollState VerticalScrollState { get; set; }
Property Value
ViewDefinition
Gets or sets the IGridViewDefinition associated with this template.
Declaration
[Browsable(false)]
public IGridViewDefinition ViewDefinition { get; set; }
Property Value
Methods
AnalyzeQueueCore(List<GridViewEvent>)
Analyzes a queue of grid view events.
Declaration
protected virtual bool AnalyzeQueueCore(List<GridViewEvent> events)
Parameters
events
List<GridViewEvent>
The list of events to analyze.
Returns
true if the queue was analyzed successfully; otherwise, false.
BeginInit()
Begins initialization of the view template.
Declaration
public virtual void BeginInit()
Implements
BeginUpdate()
Begins an update block to defer notifications and improve performance during bulk operations.
Declaration
public virtual void BeginUpdate()
BestFitColumns()
Automatically adjusts the width of all columns to fit their content.
Declaration
public void BestFitColumns()
BestFitColumns(BestFitColumnMode)
Automatically adjusts the width of all columns to fit their content using the specified mode.
Declaration
public void BestFitColumns(BestFitColumnMode mode)
Parameters
mode
The best fit mode to use for column sizing.
ClearAllSummariesFromGroups()
Clears all summaries from groups.
Declaration
protected virtual void ClearAllSummariesFromGroups()
CollapseAllGroups()
Collapses all group rows when data is grouped.
Declaration
public void CollapseAllGroups()
CreateBindingContext()
Creates the binding context for this grid view template.
Declaration
protected virtual BindingContext CreateBindingContext()
Returns
A new instance of BindingContext.
CreateListSource()
Creates the list source for this grid view template.
Declaration
protected virtual GridViewListSource CreateListSource()
Returns
A new instance of GridViewListSource.
DeferRefresh()
Defers refresh operations until the returned IDisposable is disposed.
Declaration
public virtual IDisposable DeferRefresh()
Returns
An IDisposable that ends the defer refresh when disposed.
DispatchEvent(GridViewEvent)
Dispatches the event.
Declaration
protected virtual void DispatchEvent(GridViewEvent gridEvent)
Parameters
gridEvent
The grid event.
DispatchEvent(GridViewEvent, bool)
Dispatches the event.
Declaration
protected virtual void DispatchEvent(GridViewEvent gridEvent, bool postUI)
Parameters
gridEvent
The grid event.
postUI
The post UI.
Dispose(bool)
Releases the unmanaged resources used by the Component and optionally releases the managed resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
disposing
true to release both managed and unmanaged resources; false to release only unmanaged resources.
Overrides
EndInit()
Ends view template initialization.
Declaration
public virtual void EndInit()
Implements
EndUpdate()
Ends the update block and triggers notifications.
Declaration
public void EndUpdate()
EndUpdate(DataViewChangedEventArgs)
Ends the update block and triggers notifications with the specified event arguments.
Declaration
public void EndUpdate(DataViewChangedEventArgs e)
Parameters
e
The event arguments describing the view changes.
EndUpdate(bool)
Ends the update block with the option to control notifications.
Declaration
public void EndUpdate(bool notify)
Parameters
notify
If set to true, triggers change notifications.
EndUpdate(bool, DataViewChangedEventArgs)
Ends the update block with control over notifications and specific event arguments.
Declaration
public virtual void EndUpdate(bool notify, DataViewChangedEventArgs e)
Parameters
notify
If set to true, triggers change notifications.
e
The event arguments describing the view changes.
EnsureHierarchyProvider()
Resets the hierarchy data provider.
Declaration
protected virtual void EnsureHierarchyProvider()
EnsureRowType(GridViewTemplate)
Ensures the type of the row.
Declaration
protected virtual void EnsureRowType(GridViewTemplate gridViewTemplate)
Parameters
gridViewTemplate
The grid view template.
ExpandAllGroups()
Expands all group rows when data is grouped.
Declaration
public void ExpandAllGroups()
GetDefaultCurrentRow(GridViewTemplate, GridViewInfo, bool)
Declaration
protected virtual GridViewRowInfo GetDefaultCurrentRow(GridViewTemplate template, GridViewInfo viewInfo, bool checkItemCount)
Parameters
template
viewInfo
checkItemCount
Returns
GetEventListenerPirotiy()
Gets the event listener priority for this template.
Declaration
protected virtual EventListenerPriority GetEventListenerPirotiy()
Returns
An EventListenerPriority value indicating the priority.
GetEventProcessMode()
Gets the event processing mode for this template.
Declaration
protected virtual GridEventProcessMode GetEventProcessMode()
Returns
A GridEventProcessMode value indicating the processing mode.
LoadFrom(IDataReader)
Loads data from an IDataReader and resets the current data source.
Declaration
public void LoadFrom(IDataReader dataReader)
Parameters
dataReader
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
public virtual void NotifyRowExpanded()
OnBindingContextChanged(EventArgs)
Raises the event.
OnCreateRowInfo(GridViewCreateRowInfoEventArgs)
Raises the event.
Declaration
protected virtual void OnCreateRowInfo(GridViewCreateRowInfoEventArgs e)
Parameters
e
GridViewCreateRowInfoEventArgs
The GridViewCreateRowInfoEventArgs instance containing the event data.
OnNotifyPropertyChanged(PropertyChangedEventArgs)
Raises the PropertyChanged event.
Declaration
protected virtual void OnNotifyPropertyChanged(PropertyChangedEventArgs e)
Parameters
e
The event arguments containing the property change information.
OnNotifyPropertyChanged(string)
Raises the PropertyChanged event for the specified property.
Declaration
protected virtual void OnNotifyPropertyChanged(string propertyName)
Parameters
propertyName
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
protected virtual void OnPropertyChanging(PropertyChangingEventArgsEx e)
Parameters
e
A PropertyChangingEventArgsEx instance containing event data.
OnPropertyChanging(string)
Raises the PropertyChanging event for the specified property.
OnViewChanged(DataViewChangedEventArgs)
Raises the event.
Declaration
protected void OnViewChanged(DataViewChangedEventArgs e)
Parameters
e
The DataViewChangedEventArgs instance containing the event data.
OnViewChanged(object, DataViewChangedEventArgs)
Called when the view is changed.
Declaration
protected virtual void OnViewChanged(object sender, DataViewChangedEventArgs e)
Parameters
sender
The sender.
e
The DataViewChangedEventArgs instance containing the event data.
PostProcessEventCore(GridViewEvent)
Post-processes a grid view event.
Declaration
protected virtual GridViewEventResult PostProcessEventCore(GridViewEvent eventData)
Parameters
eventData
The event data to process.
Returns
A GridViewEventResult indicating the result of the processing.
PreProcessEventCore(GridViewEvent)
Pre-processes a grid view event.
Declaration
protected virtual GridViewEventResult PreProcessEventCore(GridViewEvent eventData)
Parameters
eventData
The event data to pre-process.
Returns
A GridViewEventResult indicating the result of the pre-processing.
ProcessColumnPropertyChangedEvent(GridViewColumn, RadPropertyChangedEventArgs)
Processes a column property changed event.
Declaration
protected virtual GridViewEventResult ProcessColumnPropertyChangedEvent(GridViewColumn column, RadPropertyChangedEventArgs e)
Parameters
column
The column whose property changed.
e
The event arguments containing property change information.
Returns
A GridViewEventResult indicating the result of the processing.
ProcessEventCore(GridViewEvent)
Processes a grid view event.
Declaration
protected virtual GridViewEventResult ProcessEventCore(GridViewEvent eventData)
Parameters
eventData
The event data to process.
Returns
A GridViewEventResult indicating the result of the processing.
Refresh()
Refreshes the grid view template by reloading data and updating the display.
Declaration
public virtual void Refresh()
Refresh(params GridViewColumn[])
Refreshes the grid view template with data changes for the specified columns.
Declaration
public virtual void Refresh(params GridViewColumn[] affectedColumns)
Parameters
affectedColumns
The columns that have been affected by data changes.
ResetCurrentColumn()
Resets the current column.
Declaration
protected virtual void ResetCurrentColumn()
ResetCurrentRow()
Resets the current row.
Declaration
protected virtual void ResetCurrentRow()
ResumeEvent(KnownEvents)
Resumes the event.
Declaration
protected virtual void ResumeEvent(KnownEvents eventId)
Parameters
eventId
The event id.
SetEnableAlternatingRowColor(bool)
Sets whether the alternating row color is enabled.
Declaration
protected virtual void SetEnableAlternatingRowColor(bool value)
Parameters
value
The value.
SetError(GridViewCellCancelEventArgs, Exception)
Sets an error for a grid view cell with the specified exception.
Declaration
public void SetError(GridViewCellCancelEventArgs e, Exception exception)
Parameters
e
The GridViewCellCancelEventArgs instance containing the event data.
exception
The exception that occurred.
SetError(GridViewCellCancelEventArgs, string)
Sets an error for a grid view cell with the specified message.
Declaration
public void SetError(GridViewCellCancelEventArgs e, string message)
Parameters
e
The GridViewCellCancelEventArgs instance containing the event data.
message
The error message.
SetError(GridViewDataErrorEventArgs)
Sets an error using the specified data error event arguments.
Declaration
public void SetError(GridViewDataErrorEventArgs e)
Parameters
e
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
protected virtual bool SetProperty<T>(string propertyName, ref T propertyField, T value)
Parameters
propertyName
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
true if new value is being set
Example
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
protected virtual void SuspendEvent(KnownEvents eventId)
Parameters
eventId
The event id.
UnwireEvents()
Unwires event handlers for the template's internal events.
Declaration
protected virtual void UnwireEvents()
WireEvents()
Wires up event handlers for the template's internal events.
Declaration
protected virtual void WireEvents()
Events
BindingContextChanged
Occurs when the binding context has changed.
Declaration
public event EventHandler BindingContextChanged
Event Value
Implements
CreateRowInfo
Occurs when the instance of GridViewRowInfo is created.
Declaration
public event GridViewCreateRowInfoEventHandler CreateRowInfo
Event Value
Initialized
Occurs when initialization of the component is completed.
Declaration
[Browsable(false)]
public event EventHandler Initialized
Event Value
Implements
PropertyChanged
Occurs when a property value has changed.
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Value
Implements
PropertyChanging
Occurs when a property value is changing.
Declaration
public event PropertyChangingEventHandlerEx PropertyChanging
Event Value
Implements
ViewChanged
Occurs when the view is changed.
Declaration
public event DataViewChangedEventHandler ViewChanged
Event Value