Class GridViewTemplate
This component represents a customizable view template for displaying flat tabular data.
Inheritance
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.GridView.dll
Syntax
public class GridViewTemplate : Component, IDataItemSource, IHierarchicalRow, INotifyPropertyChangingEx, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IGridViewEventListener
Constructors
GridViewTemplate()
Properties
AddNewRowPosition
Gets or sets a value indicating the location of the new row in the view template.
Declaration
public SystemRowPosition AddNewRowPosition { get; set; }
Property Value
|
SystemRowPosition
|
See Also
AllowAddNewRow
Gets or sets a value indicating whether the user can add new rows through the grid.
Declaration
public bool AllowAddNewRow { get; set; }
Property Value
|
System.Boolean
|
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
See Also
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
public bool AllowAutoSizeColumns { get; set; }
Property Value
|
System.Boolean
|
See Also
AllowCellContextMenu
Gets or sets a value indicating whether context menu is displayed when user right clicks on a data cell.
Declaration
public bool AllowCellContextMenu { get; set; }
Property Value
|
System.Boolean
|
AllowColumnChooser
Gets or sets a value indicating whether GridViewColumnChooser is available to the user for this instance of GridViewTemplate.
Declaration
public bool AllowColumnChooser { get; set; }
Property Value
|
System.Boolean
|
See Also
AllowColumnHeaderContextMenu
Gets or sets a value indicating whether context menu is displayed when user right-clicks on a column header.
Declaration
public bool AllowColumnHeaderContextMenu { get; set; }
Property Value
|
System.Boolean
|
AllowColumnReorder
Gets or sets a value indicating whether user can reorder Columns.
Declaration
public bool AllowColumnReorder { get; set; }
Property Value
|
System.Boolean
|
AllowColumnResize
Gets or sets a value indicating whether user can resize columns.
Declaration
public bool AllowColumnResize { get; set; }
Property Value
|
System.Boolean
|
Remarks
This property does not prevent developer from setting Width
See Also
AllowDeleteRow
Gets or sets a value indicating whether user can delete rows.
Declaration
public bool AllowDeleteRow { get; set; }
Property Value
|
System.Boolean
|
See Also
AllowDragToGroup
Gets or sets a value indicating whether user can drag a column header to grouping panel.
Declaration
public bool AllowDragToGroup { get; set; }
Property Value
|
System.Boolean
|
AllowEditRow
Gets or sets a value indicating whether user can edit rows.
Declaration
public bool AllowEditRow { get; set; }
Property Value
|
System.Boolean
|
See Also
AllowMultiColumnSorting
Gets or sets a value indicating whether the end-user can sort by more than one column.
Declaration
public bool AllowMultiColumnSorting { get; set; }
Property Value
|
System.Boolean
|
AllowRowHeaderContextMenu
Gets or sets a value indicating whether context menu is displayed when user right clicks on a row header.
Declaration
public bool AllowRowHeaderContextMenu { get; set; }
Property Value
|
System.Boolean
|
AllowRowReorder
Gets or sets a value indicating whether the user is able to reorder rows in the grid
Declaration
public bool AllowRowReorder { get; set; }
Property Value
|
System.Boolean
|
See Also
AllowRowResize
Gets or sets a value indicating whether user can resize a row.
Declaration
public bool AllowRowResize { get; set; }
Property Value
|
System.Boolean
|
Remarks
This property does not prevent developer from setting Height
See Also
AllowSearchRow
Gets or sets a value indicating whether the user can search in the data contained in the grid.
Declaration
public bool AllowSearchRow { get; set; }
Property Value
|
System.Boolean
|
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
See Also
AutoExpandGroups
Sets or gets a value indicating the initial state of group rows when data is grouped.
Declaration
public bool AutoExpandGroups { get; set; }
Property Value
|
System.Boolean
|
See Also
AutoGenerateColumns
Gets or sets a value indicating whether columns are created automatically when the Telerik.WinControls.UIViewTemplate.DataSource or Telerik.WinControls.UIViewTemplate.DataMember properties are set.
Declaration
public bool AutoGenerateColumns { get; set; }
Property Value
|
System.Boolean
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
public GridViewAutoSizeColumnsMode AutoSizeColumnsMode { get; set; }
Property Value
|
GridViewAutoSizeColumnsMode
|
See Also
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
public bool AutoUpdateObjectRelationalSource { get; set; }
Property Value
|
System.Boolean
|
BindingContext
Gets or sets the binding context for data binding operations.
Declaration
public BindingContext BindingContext { get; }
Property Value
|
System.Windows.Forms.BindingContext
The BindingContext used for data binding. |
Implements
BottomPinnedRowsMode
Gets or sets a value indicating how bottom pinned rows are laid out.
Declaration
public GridViewBottomPinnedRowsMode BottomPinnedRowsMode { get; set; }
Property Value
|
GridViewBottomPinnedRowsMode
|
See Also
Caption
Gets or sets the caption text.
Declaration
public string Caption { get; set; }
Property Value
|
System.String
|
CaseSensitive
Indicates whether string comparisons of data are case-sensitive.
Declaration
public bool CaseSensitive { get; set; }
Property Value
|
System.Boolean
|
ChildRows
Gets the collection of child rows for this grid view template.
Declaration
public GridViewChildRowCollection ChildRows { get; }
Property Value
|
GridViewChildRowCollection
A GridViewChildRowCollection containing the child rows. |
Implements
ChildViewTabsPosition
Gets or sets the position to place tabs for child views related with this template.
Declaration
public TabPositions ChildViewTabsPosition { get; set; }
Property Value
|
TabPositions
|
ColumnCount
Gets or sets the number of columns displayed in the current GridViewTemplate.
Declaration
public int ColumnCount { get; set; }
Property Value
|
System.Int32
|
Columns
Gets the collection of columns in this grid view template.
Declaration
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
public bool ContainsColumnExpression { get; }
Property Value
|
System.Boolean
|
CurrentColumn
Gets or sets the column containing the current cell in the grid.
Declaration
public GridViewColumn CurrentColumn { get; set; }
Property Value
|
GridViewColumn
|
See Also
DataMember
Gets or sets the name of the list or table in the data source for which the GridViewTemplate is displaying data.
Declaration
public string DataMember { get; set; }
Property Value
|
System.String
|
DataSource
Gets or sets the data source that the GridViewTemplate is displaying data for.
Declaration
public object DataSource { get; set; }
Property Value
|
System.Object
|
DataView
Gets the data view.
Declaration
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
public virtual bool EnableAlternatingRowColor { get; set; }
Property Value
|
System.Boolean
|
EnableCustomFiltering
Gets or sets a value indicating whether the data can be filtered programmatically.
Declaration
public bool EnableCustomFiltering { get; set; }
Property Value
|
System.Boolean
|
EnableCustomGrouping
Gets or sets a value indicating whether the data can be grouped programmatically.
Declaration
public bool EnableCustomGrouping { get; set; }
Property Value
|
System.Boolean
|
EnableCustomSorting
Gets or sets a value indicating whether the data can be sorted programmatically.
Declaration
public bool EnableCustomSorting { get; set; }
Property Value
|
System.Boolean
|
EnableFiltering
Gets or sets a value indicating whether the data in the current DataView can be filtered.
Declaration
public bool EnableFiltering { get; set; }
Property Value
|
System.Boolean
|
EnableGrouping
Gets or sets a value indicating whether the data in the current GridViewTemplate can be grouped by users.
Declaration
public bool EnableGrouping { get; set; }
Property Value
|
System.Boolean
|
See Also
EnableHierarchyFiltering
Gets or sets a value indicating whether the data can be filtered using parent/child relationship.
Declaration
public bool EnableHierarchyFiltering { get; set; }
Property Value
|
System.Boolean
|
EnableSorting
Gets or sets a value indicating whether the data can be sorted by the end-users.
Declaration
public bool EnableSorting { get; set; }
Property Value
|
System.Boolean
|
EventDispatcher
Gets the event dispatcher
Declaration
public virtual EventDispatcher EventDispatcher { get; }
Property Value
|
EventDispatcher
|
ExcelFilteredColumns
This property is not relevant for this class.
Declaration
public List<GridViewDataColumn> ExcelFilteredColumns { get; }
Property Value
|
System.Collections.Generic.List<GridViewDataColumn>
|
FilterDescriptors
Gets the filter descriptors.
Declaration
public FilterDescriptorCollection FilterDescriptors { get; }
Property Value
|
FilterDescriptorCollection
The filter descriptors. |
FilterPredicate
Gets or sets the filter predicate used for filtering operation.
Declaration
public Predicate<GridViewRowInfo> FilterPredicate { get; set; }
Property Value
|
System.Predicate<GridViewRowInfo>
The filter. |
GroupComparer
Gets or sets the group comparer.
Declaration
public IComparer<Group<GridViewRowInfo>> GroupComparer { get; set; }
Property Value
|
System.Collections.Generic.IComparer<Group<GridViewRowInfo>>
The group comparer. |
GroupDescriptors
Gets the group descriptors.
Declaration
public GroupDescriptorCollection GroupDescriptors { get; }
Property Value
|
GroupDescriptorCollection
The group descriptors. |
GroupPredicate
Gets or sets the group predicate.
Declaration
public GroupPredicate<GridViewRowInfo> GroupPredicate { get; set; }
Property Value
|
GroupPredicate<GridViewRowInfo>
The group predicate. |
Groups
Gets the groups.
Declaration
public DataGroupCollection Groups { get; }
Property Value
|
DataGroupCollection
The groups. |
HierarchyDataProvider
Gets or sets the hierarchy data provider.
Declaration
public virtual GridViewHierarchyDataProvider HierarchyDataProvider { get; set; }
Property Value
|
GridViewHierarchyDataProvider
The hierarchy data provider. |
HierarchyLevel
Gets the level of nesting for this template.
Declaration
public int HierarchyLevel { get; }
Property Value
|
System.Int32
|
Implements
HorizontalScrollState
Gets or sets the display state of grid horizontal scrollbars.
Declaration
public ScrollState HorizontalScrollState { get; set; }
Property Value
|
ScrollState
|
IsInitialized
Gets a value indicating whether the component is initialized.
Declaration
public bool IsInitialized { get; }
Property Value
|
System.Boolean
|
IsSelfReference
Gets a value indicating whether this is self reference relation.
Declaration
public bool IsSelfReference { get; }
Property Value
|
System.Boolean
|
IsUpdating
Determines whether the template is in a Begin/End update block.
Declaration
public bool IsUpdating { get; }
Property Value
|
System.Boolean
|
IsVirtualRows
Gets a value indicating whether the ChildRows in hierarchy mode is virtual and hosted outside Rows collection.
Declaration
public bool IsVirtualRows { get; }
Property Value
|
System.Boolean
|
ListSource
Gets the list source.
Declaration
public RadListSource<GridViewRowInfo> ListSource { get; }
Property Value
|
RadListSource<GridViewRowInfo>
The list source. |
MasterTemplate
Gets the root template.
Declaration
public virtual MasterGridViewTemplate MasterTemplate { get; }
Property Value
|
MasterGridViewTemplate
|
MasterViewInfo
Gets the master view info.
Declaration
public GridViewInfo MasterViewInfo { get; }
Property Value
|
GridViewInfo
The master view info. |
MergeCellsEditMode
Sets a value indicating how the merged cells will be edited.
Declaration
public MergeCellsEditMode MergeCellsEditMode { get; set; }
Property Value
|
MergeCellsEditMode
|
MergeCellsMode
Indicates whether and how the cells will be merged.
Declaration
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
public string NewRowText { get; set; }
Property Value
|
System.String
The new row text. |
OwnerSite
This property is not relevant for this class.
Declaration
public ISite OwnerSite { get; set; }
Property Value
|
System.ComponentModel.ISite
|
Parent
Gets or sets the parent.
Declaration
public GridViewTemplate Parent { get; }
Property Value
|
GridViewTemplate
The parent. |
PinnedColumns
Gets a readonly collection of GridViewColumn containing the pinned rows in this template.
Declaration
public ReadOnlyCollection<GridViewColumn> PinnedColumns { get; }
Property Value
|
System.Collections.ObjectModel.ReadOnlyCollection<GridViewColumn>
|
ReadOnly
Gets or sets a value indicating whether the data in this template can be modified
Declaration
public bool ReadOnly { get; set; }
Property Value
|
System.Boolean
|
RowCount
Gets or sets the number of rows contained in the current GridViewTemplate.
Declaration
public int RowCount { get; set; }
Property Value
|
System.Int32
|
Rows
Gets the collection of rows in this grid view template.
Declaration
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
public SystemRowPosition SearchRowPosition { get; set; }
Property Value
|
SystemRowPosition
|
See Also
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
|
System.Boolean
|
SelectNewRowAsCurrent
This property controls if the new row will be made current if there are no other row in the grid.
Declaration
public bool SelectNewRowAsCurrent { get; set; }
Property Value
|
System.Boolean
|
ShowChildViewCaptions
Gets or sets a value indicating whether to show child view captions.
Declaration
public bool ShowChildViewCaptions { get; set; }
Property Value
|
System.Boolean
|
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
public bool ShowCollapsedGroupSummaries { get; set; }
Property Value
|
System.Boolean
|
ShowColumnHeaders
Gets or sets a value indicating whether the column headers are visible.
Declaration
public bool ShowColumnHeaders { get; set; }
Property Value
|
System.Boolean
|
ShowFilterCellOperatorText
Gets or sets a value indicating whether the filter operator text should be shown in the filter cell
Declaration
public bool ShowFilterCellOperatorText { get; set; }
Property Value
|
System.Boolean
|
ShowFilteringRow
Gets or sets a value indicating whether the filtering row should be visible.
Declaration
public bool ShowFilteringRow { get; set; }
Property Value
|
System.Boolean
|
ShowGroupedColumns
Gets or sets a value indicating whether the columns by which the data is grouped are visible.
Declaration
public bool ShowGroupedColumns { get; set; }
Property Value
|
System.Boolean
|
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.
See Also
ShowHeaderCellButtons
Gets or sets a value indicating whether the header cell buttons are visible.
Declaration
public bool ShowHeaderCellButtons { get; set; }
Property Value
|
System.Boolean
|
ShowParentGroupSummaries
Gets or sets a value indicating whether parent group summary rows are visible in grouping.
Declaration
public bool ShowParentGroupSummaries { get; set; }
Property Value
|
System.Boolean
|
ShowRowHeaderColumn
Gets or sets a value indicating whether the row header column is visible.
Declaration
public bool ShowRowHeaderColumn { get; set; }
Property Value
|
System.Boolean
|
ShowSelectColumn
Gets or sets a value indicating whether the select column is visible. The select column in only supported for the GridViewSelectionMode.FullRowSelect.
Declaration
public bool ShowSelectColumn { get; set; }
Property Value
|
System.Boolean
|
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
public bool ShowSubTotals { get; set; }
Property Value
|
System.Boolean
|
ShowTotals
Gets or sets a value indicating whether total summary rows are visible in grouping.
Declaration
public bool ShowTotals { get; set; }
Property Value
|
System.Boolean
|
SortComparer
Gets or sets the sort comparer.
Declaration
public IComparer<GridViewRowInfo> SortComparer { get; set; }
Property Value
|
System.Collections.Generic.IComparer<GridViewRowInfo>
The sort comparer. |
SortDescriptors
Gets the sort descriptors.
Declaration
public SortDescriptorCollection SortDescriptors { get; }
Property Value
|
SortDescriptorCollection
The sort descriptors. |
SummaryRowGroupHeaders
Gets the collection containing the summary items placed in the group header.
Declaration
public GridViewSummaryRowItemCollection SummaryRowGroupHeaders { get; }
Property Value
|
GridViewSummaryRowItemCollection
|
SummaryRowsBottom
Gets the collection containing summary rows placed at the bottom of each DataGroup.
Declaration
public GridViewSummaryRowItemCollection SummaryRowsBottom { get; }
Property Value
|
GridViewSummaryRowItemCollection
|
SummaryRowsTop
Gets the collection containing summary rows placed on top of each DataGroup.
Declaration
public GridViewSummaryRowItemCollection SummaryRowsTop { get; }
Property Value
|
GridViewSummaryRowItemCollection
|
Tag
Gets or sets the tag.
Declaration
public object Tag { get; set; }
Property Value
|
System.Object
The tag. |
Templates
Gets the collection of child grid view templates.
Declaration
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
public bool UseCheckboxRowSelectionOnly { get; set; }
Property Value
|
System.Boolean
|
Remarks
This property will only be considered if ShowSelectColumn is true.
VerticalScrollState
Gets or sets the display state of grid vertical scrollbars.
Declaration
public ScrollState VerticalScrollState { get; set; }
Property Value
|
ScrollState
|
ViewDefinition
Gets or sets the IGridViewDefinition associated with this template.
Declaration
public IGridViewDefinition ViewDefinition { get; set; }
Property Value
|
IGridViewDefinition
|
Methods
AnalyzeQueueCore(List<GridViewEvent>)
Analyzes a queue of grid view events.
Declaration
protected virtual bool AnalyzeQueueCore(List<GridViewEvent> events)
Parameters
|
System.Collections.Generic.List<GridViewEvent>
events
The list of events to analyze. |
Returns
|
System.Boolean
|
BeginInit()
Begins initialization of the view template.
Declaration
public virtual void BeginInit()
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
|
BestFitColumnMode
mode
The best fit mode to use for column sizing. |
ClearAllSummariesFromGroups()
Clears all summaries from groups.
Declaration
protected virtual void ClearAllSummariesFromGroups()
CollapseAll()
Collapses all expandable rows.
Declaration
public void CollapseAll()
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
|
System.Windows.Forms.BindingContext
A new instance of BindingContext. |
CreateListSource()
Creates the list source for this grid view template.
Declaration
protected virtual GridViewListSource CreateListSource()
Returns
|
GridViewListSource
A new instance of GridViewListSource. |
DeferRefresh()
Defers refresh operations until the returned System.IDisposable is disposed.
Declaration
public virtual IDisposable DeferRefresh()
Returns
|
System.IDisposable
An System.IDisposable that ends the defer refresh when disposed. |
DispatchEvent(GridViewEvent)
Dispatches the event.
Declaration
protected virtual void DispatchEvent(GridViewEvent gridEvent)
Parameters
|
GridViewEvent
gridEvent
The grid event. |
DispatchEvent(GridViewEvent, Boolean)
Dispatches the event.
Declaration
protected virtual void DispatchEvent(GridViewEvent gridEvent, bool postUI)
Parameters
|
GridViewEvent
gridEvent
The grid event. |
|
System.Boolean
postUI
The post UI. |
Dispose(Boolean)
Releases the unmanaged resources used by the System.ComponentModel.Component and optionally releases the managed resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
|
System.Boolean
disposing
true to release both managed and unmanaged resources; false to release only unmanaged resources. |
EndInit()
Ends view template initialization.
Declaration
public virtual void EndInit()
EndUpdate()
Ends the update block and triggers notifications.
Declaration
public void EndUpdate()
EndUpdate(Boolean)
Ends the update block with the option to control notifications.
Declaration
public void EndUpdate(bool notify)
Parameters
|
System.Boolean
notify
If set to |
EndUpdate(Boolean, DataViewChangedEventArgs)
Ends the update block with control over notifications and specific event arguments.
Declaration
public virtual void EndUpdate(bool notify, DataViewChangedEventArgs e)
Parameters
|
System.Boolean
notify
If set to |
|
DataViewChangedEventArgs
e
The event arguments describing the view changes. |
EndUpdate(DataViewChangedEventArgs)
Ends the update block and triggers notifications with the specified event arguments.
Declaration
public void EndUpdate(DataViewChangedEventArgs e)
Parameters
|
DataViewChangedEventArgs
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
gridViewTemplate
The grid view template. |
ExpandAll()
Expands all expandable rows.
Declaration
public void ExpandAll()
ExpandAllGroups()
Expands all group rows when data is grouped.
Declaration
public void ExpandAllGroups()
GetDefaultCurrentRow(GridViewTemplate, GridViewInfo, Boolean)
Declaration
protected virtual GridViewRowInfo GetDefaultCurrentRow(GridViewTemplate template, GridViewInfo viewInfo, bool checkItemCount)
Parameters
|
GridViewTemplate
template
|
|
GridViewInfo
viewInfo
|
|
System.Boolean
checkItemCount
|
Returns
|
GridViewRowInfo
|
GetEventListenerPirotiy()
Gets the event listener priority for this template.
Declaration
protected virtual EventListenerPriority GetEventListenerPirotiy()
Returns
|
EventListenerPriority
An EventListenerPriority value indicating the priority. |
GetEventProcessMode()
Gets the event processing mode for this template.
Declaration
protected virtual GridEventProcessMode GetEventProcessMode()
Returns
|
GridEventProcessMode
A GridEventProcessMode value indicating the processing mode. |
LoadFrom(IDataReader)
Loads data from an System.Data.IDataReader and resets the current data source.
Declaration
public void LoadFrom(IDataReader dataReader)
Parameters
|
System.Data.IDataReader
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 BindingContextChanged event.
Declaration
protected virtual void OnBindingContextChanged(EventArgs e)
Parameters
|
System.EventArgs
e
The System.EventArgs instance containing the event data. |
OnCreateRowInfo(GridViewCreateRowInfoEventArgs)
Raises the CreateRowInfo event.
Declaration
protected virtual void OnCreateRowInfo(GridViewCreateRowInfoEventArgs e)
Parameters
|
GridViewCreateRowInfoEventArgs
e
The GridViewCreateRowInfoEventArgs instance containing the event data. |
OnNotifyPropertyChanged(PropertyChangedEventArgs)
Raises the PropertyChanged event.
Declaration
protected virtual void OnNotifyPropertyChanged(PropertyChangedEventArgs e)
Parameters
|
System.ComponentModel.PropertyChangedEventArgs
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
|
System.String
propertyName
The name of the property that changed. |
OnPropertyChanging(String)
Raises the PropertyChanging event for the specified property.
Declaration
protected virtual bool OnPropertyChanging(string propertyName)
Parameters
|
System.String
propertyName
The name of the property that is changing. |
Returns
|
System.Boolean
|
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
|
PropertyChangingEventArgsEx
e
A PropertyChangingEventArgsEx instance containing event data. |
OnViewChanged(Object, DataViewChangedEventArgs)
Called when the view is changed.
Declaration
protected virtual void OnViewChanged(object sender, DataViewChangedEventArgs e)
Parameters
|
System.Object
sender
The sender. |
|
DataViewChangedEventArgs
e
The DataViewChangedEventArgs instance containing the event data. |
OnViewChanged(DataViewChangedEventArgs)
Raises the ViewChanged event.
Declaration
protected void OnViewChanged(DataViewChangedEventArgs e)
Parameters
|
DataViewChangedEventArgs
e
The DataViewChangedEventArgs instance containing the event data. |
PostProcessEventCore(GridViewEvent)
Post-processes a grid view event.
Declaration
protected virtual GridViewEventResult PostProcessEventCore(GridViewEvent eventData)
Parameters
|
GridViewEvent
eventData
The event data to process. |
Returns
|
GridViewEventResult
A GridViewEventResult indicating the result of the processing. |
PreProcessEventCore(GridViewEvent)
Pre-processes a grid view event.
Declaration
protected virtual GridViewEventResult PreProcessEventCore(GridViewEvent eventData)
Parameters
|
GridViewEvent
eventData
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
protected virtual GridViewEventResult ProcessColumnPropertyChangedEvent(GridViewColumn column, RadPropertyChangedEventArgs e)
Parameters
|
GridViewColumn
column
The column whose property changed. |
|
RadPropertyChangedEventArgs
e
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
protected virtual GridViewEventResult ProcessEventCore(GridViewEvent eventData)
Parameters
|
GridViewEvent
eventData
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
public virtual void Refresh()
Refresh(GridViewColumn[])
Refreshes the grid view template with data changes for the specified columns.
Declaration
public virtual void Refresh(params GridViewColumn[] affectedColumns)
Parameters
|
GridViewColumn[]
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
|
KnownEvents
eventId
The event id. |
SetEnableAlternatingRowColor(Boolean)
Sets whether the alternating row color is enabled.
Declaration
protected virtual void SetEnableAlternatingRowColor(bool value)
Parameters
|
System.Boolean
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
|
GridViewCellCancelEventArgs
e
The GridViewCellCancelEventArgs instance containing the event data. |
|
System.Exception
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
|
GridViewCellCancelEventArgs
e
The GridViewCellCancelEventArgs instance containing the event data. |
|
System.String
message
The error message. |
SetError(GridViewDataErrorEventArgs)
Sets an error using the specified data error event arguments.
Declaration
public void SetError(GridViewDataErrorEventArgs e)
Parameters
|
GridViewDataErrorEventArgs
e
The GridViewDataErrorEventArgs containing error information. |
SetParent(GridViewTemplate)
This method is not relevant for this class.
Declaration
public void SetParent(GridViewTemplate parent)
Parameters
|
GridViewTemplate
parent
The parent template. |
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
|
System.String
propertyName
The name of the property, that will appear as propertyName in the PropertyChanging and PropertyChanged event args. |
|
T
propertyField
The field, that is related to the property. |
|
T
value
The value that is to be set to the field in case the PropertyChanging event is not being System.ComponentModel.CancelEventArgs.Cancel. |
Returns
|
System.Boolean
true if new value is being set |
Type Parameters
|
T
The type of the field that is to be modified. |
Examples
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
|
KnownEvents
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 Type
|
System.EventHandler
|
Implements
CreateRowInfo
Occurs when the instance of GridViewRowInfo is created.
Declaration
public event GridViewCreateRowInfoEventHandler CreateRowInfo
Event Type
|
GridViewCreateRowInfoEventHandler
|
Initialized
Occurs when initialization of the component is completed.
Declaration
public event EventHandler Initialized
Event Type
|
System.EventHandler
|
PropertyChanged
Occurs when a property value has changed.
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
|
System.ComponentModel.PropertyChangedEventHandler
|
PropertyChanging
Occurs when a property value is changing.
Declaration
public event PropertyChangingEventHandlerEx PropertyChanging
Event Type
|
PropertyChangingEventHandlerEx
|
Implements
ViewChanged
Occurs when the view is changed.
Declaration
public event DataViewChangedEventHandler ViewChanged
Event Type
|
DataViewChangedEventHandler
|
Explicit Interface Implementations
IDataItemSource.BindingComplete()
Notifies the data item source that data binding has completed.
Declaration
void IDataItemSource.BindingComplete()
Implements
IDataItemSource.Initialize()
Initializes the data item source by setting up bound columns and current row/column state.
Declaration
void IDataItemSource.Initialize()
Implements
IDataItemSource.MetadataChanged(PropertyDescriptor)
Notifies the data item source that metadata for a property has changed.
Declaration
void IDataItemSource.MetadataChanged(PropertyDescriptor pd)
Parameters
|
System.ComponentModel.PropertyDescriptor
pd
The property descriptor for the changed property. |
Implements
IDataItemSource.NewItem()
Creates a new data row item for this grid view template.
Declaration
IDataItem IDataItemSource.NewItem()
Returns
|
IDataItem
A new IDataItem instance representing a grid row. |
Implements
IGridViewEventListener.AnalyzeQueue(List<GridViewEvent>)
Declaration
bool IGridViewEventListener.AnalyzeQueue(List<GridViewEvent> events)
Parameters
|
System.Collections.Generic.List<GridViewEvent>
events
|
Returns
|
System.Boolean
|
Implements
IGridViewEventListener.DesiredEvents
Declaration
GridEventType IGridViewEventListener.DesiredEvents { get; }
Returns
|
GridEventType
|
Implements
IGridViewEventListener.DesiredProcessMode
Declaration
GridEventProcessMode IGridViewEventListener.DesiredProcessMode { get; }
Returns
|
GridEventProcessMode
|
Implements
IGridViewEventListener.PostProcessEvent(GridViewEvent)
Declaration
GridViewEventResult IGridViewEventListener.PostProcessEvent(GridViewEvent eventData)
Parameters
|
GridViewEvent
eventData
|
Returns
|
GridViewEventResult
|
Implements
IGridViewEventListener.PreProcessEvent(GridViewEvent)
Declaration
GridViewEventResult IGridViewEventListener.PreProcessEvent(GridViewEvent eventData)
Parameters
|
GridViewEvent
eventData
|
Returns
|
GridViewEventResult
|
Implements
IGridViewEventListener.Priority
Declaration
EventListenerPriority IGridViewEventListener.Priority { get; }
Returns
|
EventListenerPriority
|
Implements
IGridViewEventListener.ProcessEvent(GridViewEvent)
Declaration
GridViewEventResult IGridViewEventListener.ProcessEvent(GridViewEvent eventData)
Parameters
|
GridViewEvent
eventData
|
Returns
|
GridViewEventResult
|
Implements
IHierarchicalRow.HasChildViews
Declaration
bool IHierarchicalRow.HasChildViews { get; }
Returns
|
System.Boolean
|