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
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.
|
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 Add
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.
|
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.
|
AllowColumnChooser
Gets or sets a value indicating whether Grid
Declaration
public bool AllowColumnChooser { get; set; }
Property Value
System.
|
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.
|
AllowColumnReorder
Gets or sets a value indicating whether user can reorder Columns.
Declaration
public bool AllowColumnReorder { get; set; }
Property Value
System.
|
AllowColumnResize
Gets or sets a value indicating whether user can resize columns.
Declaration
public bool AllowColumnResize { get; set; }
Property Value
System.
|
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.
|
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.
|
AllowEditRow
Gets or sets a value indicating whether user can edit rows.
Declaration
public bool AllowEditRow { get; set; }
Property Value
System.
|
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.
|
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.
|
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.
|
See Also
AllowRowResize
Gets or sets a value indicating whether user can resize a row.
Declaration
public bool AllowRowResize { get; set; }
Property Value
System.
|
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.
|
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 Search
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.
|
See Also
AutoGenerateColumns
Gets or sets a value indicating whether columns are created automatically when the Telerik.
Declaration
public bool AutoGenerateColumns { get; set; }
Property Value
System. 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
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.
|
BindingContext
Gets or sets the binding context.
Declaration
public BindingContext BindingContext { get; }
Property Value
System. The binding context. |
Implements
BottomPinnedRowsMode
Gets or sets a value indicating how bottom pinned rows are laid out.
Declaration
public GridViewBottomPinnedRowsMode BottomPinnedRowsMode { get; set; }
Property Value
See Also
Caption
Gets or sets the caption text.
Declaration
public string Caption { get; set; }
Property Value
System.
|
CaseSensitive
Indicates whether string comparisons of data are case-sensitive.
Declaration
public bool CaseSensitive { get; set; }
Property Value
System.
|
ChildRows
Gets the child rows.
Declaration
public GridViewChildRowCollection ChildRows { get; }
Property Value
Grid 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
ColumnCount
Gets or sets the number of columns displayed in the current Grid
Declaration
public int ColumnCount { get; set; }
Property Value
System.
|
Columns
Gets the columns.
Declaration
public virtual GridViewColumnCollection Columns { get; }
Property Value
Grid The columns. |
ContainsColumnExpression
Gets a value indicating if the template contains a column with defined expression.
Declaration
public bool ContainsColumnExpression { get; }
Property Value
System.
|
CurrentColumn
Gets or sets the column containing the current cell in the grid.
Declaration
public GridViewColumn CurrentColumn { get; set; }
Property Value
See Also
DataMember
Gets or sets the name of the list or table in the data source for which the Grid
Declaration
public string DataMember { get; set; }
Property Value
System.
|
DataSource
Gets or sets the data source that the Grid
Declaration
public object DataSource { get; set; }
Property Value
System.
|
DataView
Gets the data view.
Declaration
public RadCollectionView<GridViewRowInfo> DataView { get; }
Property Value
Rad 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.
|
EnableCustomFiltering
Gets or sets a value indicating whether the data can be filtered programmatically.
Declaration
public bool EnableCustomFiltering { get; set; }
Property Value
System.
|
EnableCustomGrouping
Gets or sets a value indicating whether the data can be grouped programmatically.
Declaration
public bool EnableCustomGrouping { get; set; }
Property Value
System.
|
EnableCustomSorting
Gets or sets a value indicating whether the data can be sorted programmatically.
Declaration
public bool EnableCustomSorting { get; set; }
Property Value
System.
|
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.
|
EnableGrouping
Gets or sets a value indicating whether the data in the current Grid
Declaration
public bool EnableGrouping { get; set; }
Property Value
System.
|
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.
|
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.
|
EventDispatcher
Gets the event dispatcher
Declaration
public virtual EventDispatcher EventDispatcher { get; }
Property Value
ExcelFilteredColumns
Keep the order of the columns in the Excel Like filtering
Declaration
public List<GridViewDataColumn> ExcelFilteredColumns { get; }
Property Value
System.
|
FilterDescriptors
Gets the filter descriptors.
Declaration
public FilterDescriptorCollection FilterDescriptors { get; }
Property Value
Filter The filter descriptors. |
FilterPredicate
Gets or sets the filter predicate used for filtering operation.
Declaration
public Predicate<GridViewRowInfo> FilterPredicate { get; set; }
Property Value
System. The filter. |
GroupComparer
Gets or sets the group comparer.
Declaration
public IComparer<Group<GridViewRowInfo>> GroupComparer { get; set; }
Property Value
System. The group comparer. |
GroupDescriptors
Gets the group descriptors.
Declaration
public GroupDescriptorCollection GroupDescriptors { get; }
Property Value
Group The group descriptors. |
GroupPredicate
Gets or sets the group predicate.
Declaration
public GroupPredicate<GridViewRowInfo> GroupPredicate { get; set; }
Property Value
Group The group predicate. |
Groups
Gets the groups.
Declaration
public DataGroupCollection Groups { get; }
Property Value
Data The groups. |
HierarchyDataProvider
Gets or sets the hierarchy data provider.
Declaration
public virtual GridViewHierarchyDataProvider HierarchyDataProvider { get; set; }
Property Value
Grid The hierarchy data provider. |
HierarchyLevel
Gets the level of nesting for this template.
Declaration
public int HierarchyLevel { get; }
Property Value
System.
|
Implements
HorizontalScrollState
Gets or sets the display state of grid horizontal scrollbars.
Declaration
public ScrollState HorizontalScrollState { get; set; }
Property Value
IsInitialized
Gets a value indicating whether the component is initialized.
Declaration
public bool IsInitialized { get; }
Property Value
System.
|
IsSelfReference
Gets a value indicating whether this is self reference relation.
Declaration
public bool IsSelfReference { get; }
Property Value
System.
|
IsUpdating
Determines whether the template is in a Begin/End update block.
Declaration
public bool IsUpdating { get; }
Property Value
System.
|
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.
|
ListSource
Gets the list source.
Declaration
public RadListSource<GridViewRowInfo> ListSource { get; }
Property Value
Rad The list source. |
MasterTemplate
Gets the root template.
Declaration
public virtual MasterGridViewTemplate MasterTemplate { get; }
Property Value
MasterViewInfo
Gets the master view info.
Declaration
public GridViewInfo MasterViewInfo { get; }
Property Value
Grid The master view info. |
MergeCellsEditMode
Sets a value indicating how the merged cells will be edited.
Declaration
public MergeCellsEditMode MergeCellsEditMode { get; set; }
Property Value
MergeCellsMode
Indicates whether and how the cells will be merged.
Declaration
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
public string NewRowText { get; set; }
Property Value
System. The new row text. |
OwnerSite
Gets or sets the owner site.
Declaration
public ISite OwnerSite { get; set; }
Property Value
System. The owner site. |
Parent
Gets or sets the parent.
Declaration
public GridViewTemplate Parent { get; }
Property Value
Grid The parent. |
PinnedColumns
Gets a readonly collection of Grid
Declaration
public ReadOnlyCollection<GridViewColumn> PinnedColumns { get; }
Property Value
System.
|
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.
|
RowCount
Gets or sets the number of rows contained in the current Grid
Declaration
public int RowCount { get; set; }
Property Value
System.
|
Rows
Gets the rows.
Declaration
public GridViewRowCollection Rows { get; }
Property Value
Grid 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
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.
|
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.
|
ShowChildViewCaptions
Gets or sets a value indicating whether to show child view captions.
Declaration
public bool ShowChildViewCaptions { get; set; }
Property Value
System.
|
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 Grid
Declaration
public bool ShowCollapsedGroupSummaries { get; set; }
Property Value
System.
|
ShowColumnHeaders
Gets or sets a value indicating whether the column headers are visible.
Declaration
public bool ShowColumnHeaders { get; set; }
Property Value
System.
|
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.
|
ShowFilteringRow
Gets or sets a value indicating whether the filtering row should be visible.
Declaration
public bool ShowFilteringRow { get; set; }
Property Value
System.
|
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.
|
Remarks
Set to false, and each column contained in the Group
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.
|
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.
|
ShowRowHeaderColumn
Gets or sets a value indicating whether the row header column is visible.
Declaration
public bool ShowRowHeaderColumn { get; set; }
Property Value
System.
|
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.
|
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.
|
ShowTotals
Gets or sets a value indicating whether total summary rows are visible in grouping.
Declaration
public bool ShowTotals { get; set; }
Property Value
System.
|
SortComparer
Gets or sets the sort comparer.
Declaration
public IComparer<GridViewRowInfo> SortComparer { get; set; }
Property Value
System. The sort comparer. |
SortDescriptors
Gets the sort descriptors.
Declaration
public SortDescriptorCollection SortDescriptors { get; }
Property Value
Sort The sort descriptors. |
SummaryRowGroupHeaders
Gets the collection containing the summary items placed in the group header.
Declaration
public GridViewSummaryRowItemCollection SummaryRowGroupHeaders { get; }
Property Value
SummaryRowsBottom
Gets the collection containing summary rows placed at the bottom of each DataGroup.
Declaration
public GridViewSummaryRowItemCollection SummaryRowsBottom { get; }
Property Value
SummaryRowsTop
Gets the collection containing summary rows placed on top of each DataGroup.
Declaration
public GridViewSummaryRowItemCollection SummaryRowsTop { get; }
Property Value
Tag
Gets or sets the tag.
Declaration
public object Tag { get; set; }
Property Value
System. The tag. |
Templates
Gets the child templates.
Declaration
public GridViewTemplateCollection Templates { get; }
Property Value
Grid The child templates. |
UseCheckboxRowSelectionOnly
Gets or sets a value indicating whether user can select rows only via the selection checkboxes.
Declaration
public bool UseCheckboxRowSelectionOnly { get; set; }
Property Value
System.
|
Remarks
This property will only be considered if Show
VerticalScrollState
Gets or sets the display state of grid vertical scrollbars.
Declaration
public ScrollState VerticalScrollState { get; set; }
Property Value
ViewDefinition
Gets or sets the IGrid
Declaration
public IGridViewDefinition ViewDefinition { get; set; }
Property Value
Methods
AnalyzeQueueCore(List<GridViewEvent>)
Declaration
protected virtual bool AnalyzeQueueCore(List<GridViewEvent> events)
Parameters
System.
|
Returns
System.
|
BeginInit()
Begins initialization of the view template.
Declaration
public virtual void BeginInit()
BeginUpdate()
Begins the update.
Declaration
public virtual void BeginUpdate()
BestFitColumns()
Widens / shrinks all columns based on the space required by the text in the columns.
Declaration
public void BestFitColumns()
BestFitColumns(BestFitColumnMode)
Widens / shrinks all columns based on the space required by the text in the columns.
Declaration
public void BestFitColumns(BestFitColumnMode mode)
Parameters
Best The mode. |
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.
Declaration
protected virtual BindingContext CreateBindingContext()
Returns
System.
|
CreateListSource()
Creates the list source.
Declaration
protected virtual GridViewListSource CreateListSource()
Returns
DeferRefresh()
Defers the refresh.
Declaration
public virtual IDisposable DeferRefresh()
Returns
System.
|
DispatchEvent(GridViewEvent)
Dispatches the event.
Declaration
protected virtual void DispatchEvent(GridViewEvent gridEvent)
Parameters
Grid The grid event. |
DispatchEvent(GridViewEvent, Boolean)
Dispatches the event.
Declaration
protected virtual void DispatchEvent(GridViewEvent gridEvent, bool postUI)
Parameters
Grid The grid event. |
System. The post UI. |
Dispose(Boolean)
Releases the unmanaged resources used by the System.
Declaration
protected override void Dispose(bool disposing)
Parameters
System. 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.
Declaration
public void EndUpdate()
EndUpdate(Boolean)
Ends the update.
Declaration
public void EndUpdate(bool notify)
Parameters
System.
|
EndUpdate(Boolean, DataViewChangedEventArgs)
Ends the update.
Declaration
public virtual void EndUpdate(bool notify, DataViewChangedEventArgs e)
Parameters
System.
|
Data
|
EndUpdate(DataViewChangedEventArgs)
Ends the update.
Declaration
public void EndUpdate(DataViewChangedEventArgs e)
Parameters
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
Grid 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
Grid
|
Grid
|
System.
|
Returns
GetEventListenerPirotiy()
Declaration
protected virtual EventListenerPriority GetEventListenerPirotiy()
Returns
GetEventProcessMode()
Declaration
protected virtual GridEventProcessMode GetEventProcessMode()
Returns
LoadFrom(IDataReader)
Unbound load the IDatareader data and reset current DataSource
Declaration
public void LoadFrom(IDataReader dataReader)
Parameters
System.
|
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 Binding
Declaration
protected virtual void OnBindingContextChanged(EventArgs e)
Parameters
System. The System. |
OnCreateRowInfo(GridViewCreateRowInfoEventArgs)
Raises the Create
Declaration
protected virtual void OnCreateRowInfo(GridViewCreateRowInfoEventArgs e)
Parameters
Grid The Grid |
OnNotifyPropertyChanged(PropertyChangedEventArgs)
Raises the NotifyPropertyChanged event
Declaration
protected virtual void OnNotifyPropertyChanged(PropertyChangedEventArgs e)
Parameters
System.
|
OnNotifyPropertyChanged(String)
Raises the PropertyChanged event
Declaration
protected virtual void OnNotifyPropertyChanged(string propertyName)
Parameters
System. The name of the property |
OnPropertyChanging(String)
Declaration
protected virtual bool OnPropertyChanging(string propertyName)
Parameters
System.
|
Returns
System.
|
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
Property A Property |
OnViewChanged(Object, DataViewChangedEventArgs)
Called when the view is changed.
Declaration
protected virtual void OnViewChanged(object sender, DataViewChangedEventArgs e)
Parameters
System. The sender. |
Data The Data |
OnViewChanged(DataViewChangedEventArgs)
Raises the View
Declaration
protected void OnViewChanged(DataViewChangedEventArgs e)
Parameters
Data The Data |
PostProcessEventCore(GridViewEvent)
Declaration
protected virtual GridViewEventResult PostProcessEventCore(GridViewEvent eventData)
Parameters
Grid
|
Returns
PreProcessEventCore(GridViewEvent)
Declaration
protected virtual GridViewEventResult PreProcessEventCore(GridViewEvent eventData)
Parameters
Grid
|
Returns
ProcessColumnPropertyChangedEvent(GridViewColumn, RadPropertyChangedEventArgs)
Declaration
protected virtual GridViewEventResult ProcessColumnPropertyChangedEvent(GridViewColumn column, RadPropertyChangedEventArgs e)
Parameters
Returns
ProcessEventCore(GridViewEvent)
Declaration
protected virtual GridViewEventResult ProcessEventCore(GridViewEvent eventData)
Parameters
Grid
|
Returns
Refresh()
Refreshes this instance.
Declaration
public virtual void Refresh()
Refresh(GridViewColumn[])
Refreshes the specified affected columns.
Declaration
public virtual void Refresh(params GridViewColumn[] affectedColumns)
Parameters
Grid The affected columns. |
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
Known The event id. |
SetEnableAlternatingRowColor(Boolean)
Sets whether the alternating row color is enabled.
Declaration
protected virtual void SetEnableAlternatingRowColor(bool value)
Parameters
System. The value. |
SetError(GridViewCellCancelEventArgs, Exception)
Sets the error.
Declaration
public void SetError(GridViewCellCancelEventArgs e, Exception exception)
Parameters
Grid The Grid |
System. The exception. |
SetError(GridViewCellCancelEventArgs, String)
Sets the error.
Declaration
public void SetError(GridViewCellCancelEventArgs e, string message)
Parameters
Grid The Grid |
System. The message. |
SetError(GridViewDataErrorEventArgs)
Declaration
public void SetError(GridViewDataErrorEventArgs e)
Parameters
SetParent(GridViewTemplate)
Sets the parent for this template. Never use this method directly. Instead, add the template to its parent's collection.
Declaration
public void SetParent(GridViewTemplate parent)
Parameters
Grid 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
Property
Declaration
protected virtual bool SetProperty<T>(string propertyName, ref T propertyField, T value)
Parameters
System. The name of the property, that will appear as propertyName in the Property |
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 Property |
Returns
System. 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
Known The event id. |
UnwireEvents()
Declaration
protected virtual void UnwireEvents()
WireEvents()
Declaration
protected virtual void WireEvents()
Events
BindingContextChanged
Occurs when [binding context changed].
Declaration
public event EventHandler BindingContextChanged
Event Type
System.
|
Implements
CreateRowInfo
Occurs when the instance of Grid
Declaration
public event GridViewCreateRowInfoEventHandler CreateRowInfo
Event Type
Initialized
Occurs when initialization of the component is completed.
Declaration
public event EventHandler Initialized
Event Type
System.
|
PropertyChanged
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
System.
|
PropertyChanging
Declaration
public event PropertyChangingEventHandlerEx PropertyChanging
Event Type
Implements
ViewChanged
Occurs when the view is changed.
Declaration
public event DataViewChangedEventHandler ViewChanged
Event Type
Explicit Interface Implementations
IDataItemSource.BindingComplete()
IDataItemSource.Initialize()
Initializes IDataItemSource.
Declaration
void IDataItemSource.Initialize()
Implements
IDataItemSource.MetadataChanged(PropertyDescriptor)
Declaration
void IDataItemSource.MetadataChanged(PropertyDescriptor pd)
Parameters
System.
|
Implements
IDataItemSource.NewItem()
Create new row item.
Declaration
IDataItem IDataItemSource.NewItem()
Returns
Implements
IGridViewEventListener.AnalyzeQueue(List<GridViewEvent>)
Declaration
bool IGridViewEventListener.AnalyzeQueue(List<GridViewEvent> events)
Parameters
System.
|
Returns
System.
|
Implements
IGridViewEventListener.DesiredEvents
Declaration
GridEventType IGridViewEventListener.DesiredEvents { get; }
Returns
Implements
IGridViewEventListener.DesiredProcessMode
Declaration
GridEventProcessMode IGridViewEventListener.DesiredProcessMode { get; }
Returns
Implements
IGridViewEventListener.PostProcessEvent(GridViewEvent)
Declaration
GridViewEventResult IGridViewEventListener.PostProcessEvent(GridViewEvent eventData)
Parameters
Grid
|
Returns
Implements
IGridViewEventListener.PreProcessEvent(GridViewEvent)
Declaration
GridViewEventResult IGridViewEventListener.PreProcessEvent(GridViewEvent eventData)
Parameters
Grid
|
Returns
Implements
IGridViewEventListener.Priority
Declaration
EventListenerPriority IGridViewEventListener.Priority { get; }
Returns
Implements
IGridViewEventListener.ProcessEvent(GridViewEvent)
Declaration
GridViewEventResult IGridViewEventListener.ProcessEvent(GridViewEvent eventData)
Parameters
Grid
|
Returns
Implements
IHierarchicalRow.HasChildViews
Declaration
bool IHierarchicalRow.HasChildViews { get; }
Returns
System.
|
Implements
IHierarchicalRow.Parent
Declaration
IHierarchicalRow IHierarchicalRow.Parent { get; }