Class RadGridViewElement
Represents the element for RadGridView.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.GridView.dll
Syntax
public class RadGridViewElement : GridVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IImageElement, ITextPrimitive, ITextProvider, IRadServiceProvider, IGridViewEventListener
Constructors
RadGridViewElement()
Properties
ActiveEditor
Gets the active editor
Declaration
public IInputEditor ActiveEditor { get; }
Property Value
AutoSizeRows
Gets or sets a value indicating whether row height in a RataGridView will expand for multiline cell text
Declaration
public bool AutoSizeRows { get; set; }
Property Value
System.
|
BeginEditMode
Gets or sets value indicating how user begins editing a cell.
Declaration
public RadGridViewBeginEditMode BeginEditMode { get; set; }
Property Value
ColumnChooser
Gets the current column chooser
Declaration
public GridViewColumnChooser ColumnChooser { get; }
Property Value
ColumnChooserSortOrder
Gets or sets the column chooser sort order.
Declaration
public RadSortOrder ColumnChooserSortOrder { get; set; }
Property Value
Rad The column chooser sort order. |
ContextMenuManager
Gets an instance of Grid
Declaration
public virtual IContextMenuManager ContextMenuManager { get; }
Property Value
CurrentCell
Gets or the currently active cell in the grid.
Declaration
public GridDataCellElement CurrentCell { get; }
Property Value
CurrentColumn
Gets or sets the current column of the currently active view containing the current cell.
Declaration
public GridViewColumn CurrentColumn { get; set; }
Property Value
CurrentRow
Gets or sets the current row of the currently active view containing the current cell.
Declaration
public GridViewRowInfo CurrentRow { get; set; }
Property Value
CurrentView
Gets or sets the current view.
Declaration
public IRowView CurrentView { get; set; }
Property Value
IRow The current view. |
EditorManager
Gets an instance of Grid
Declaration
public GridViewEditManager EditorManager { get; set; }
Property Value
EnableCustomDrawing
Gets or sets a value indicating whether the PaintCell and PaintRow events are enabled.
Declaration
public bool EnableCustomDrawing { get; set; }
Property Value
System.
|
EnterKeyMode
Gets or sets value indicating the behavior when the user presses Enter while adding new row.
Declaration
public RadGridViewEnterKeyMode EnterKeyMode { get; set; }
Property Value
GridBehavior
Gets or sets an instance of Base
Declaration
public virtual IGridBehavior GridBehavior { get; set; }
Property Value
See Also
GroupExpandAnimationType
Gets or set a value indicating the animation effect that will be used when expanding/collapsing groups.
Declaration
public GridExpandAnimationType GroupExpandAnimationType { get; set; }
Property Value
GroupPanelElement
Gets the group panel element
Declaration
public GroupPanelElement GroupPanelElement { get; }
Property Value
HideSelection
Gets or sets a value indicating whether the selected item in the control remains highlighted when the control loses focus.
Returns: true if the selected item does not appear highlighted when the control loses focus; false if the selected item still appears highlighted when the control loses focus. The default is true.
Declaration
public bool HideSelection { get; set; }
Property Value
System.
|
IsInEditMode
Gets a value indicating whether the cell is in edit mode.
Declaration
public bool IsInEditMode { get; }
Property Value
System.
|
Navigator
NewRowEnterKeyMode
Gets or sets value indicating the behavior when the user presses Enter while adding new row.
Declaration
public RadGridViewNewRowEnterKeyMode NewRowEnterKeyMode { get; set; }
Property Value
PagingPanelElement
Gets the paging panel element
Declaration
public PagingPanelElement PagingPanelElement { get; }
Property Value
Panel
Gets the panel.
Declaration
public DockLayoutPanel Panel { get; }
Property Value
Dock The panel. |
ShowCellErrors
Gets or sets a value indicating whether to show cell errors.
Declaration
public bool ShowCellErrors { get; set; }
Property Value
System.
|
ShowGroupPanel
Gets or sets value indicating whether the Grid
Declaration
public bool ShowGroupPanel { get; set; }
Property Value
System.
|
ShowGroupPanelScrollbars
Gets or sets a value indicating whether the group panel will show scroll bars or it will expand to show all group headers.
Declaration
public bool ShowGroupPanelScrollbars { get; set; }
Property Value
System.
|
ShowNoDataText
Gets or sets the text to use when there is no data.
Declaration
public bool ShowNoDataText { get; set; }
Property Value
System.
|
ShowRowErrors
Gets or sets a value indicating whether to show row errors.
Declaration
public bool ShowRowErrors { get; set; }
Property Value
System.
|
SplitMode
Gets or sets a value indicating how to split RadGridView.
Declaration
public RadGridViewSplitMode SplitMode { get; set; }
Property Value
StandardTab
Gets or sets a value indicating whether the TAB key moves the focus to the next control in the tab order rather than moving focus to the next cell in the control.
Declaration
public bool StandardTab { get; set; }
Property Value
System.
|
SynchronizeCurrentRowInSplitMode
Gets or sets whether when changing the current row in one split view the same row in the other split view will be brought into view.
Declaration
public bool SynchronizeCurrentRowInSplitMode { get; set; }
Property Value
System.
|
TableElement
Gets the instance of Grid
Declaration
public GridTableElement TableElement { get; }
Property Value
See Also
Template
Gets the template.
Declaration
public MasterGridViewTemplate Template { get; }
Property Value
Master The template. |
TitleLabelElement
Gives access to label element used for the title.
Declaration
public LightVisualElement TitleLabelElement { get; }
Property Value
TitlePosition
Gets or sets a value indicating the position of the title.
Declaration
public Dock TitlePosition { get; set; }
Property Value
TitleText
Gets or set the text of the grid title.
Declaration
public string TitleText { get; set; }
Property Value
System.
|
UseScrollbarsInHierarchy
Gets or sets a value indicating whether to use dedicated vertical scrollbars in hierarchy.
Declaration
public bool UseScrollbarsInHierarchy { get; set; }
Property Value
System.
|
Methods
ArrangeOverride(SizeF)
Arranges the Rad
Declaration
protected override SizeF ArrangeOverride(SizeF finalSize)
Parameters
System. The size that is available for element. |
Returns
System. The rectangle occupied by the element. Usually |
Overrides
Remarks
In this method call to the Arrange method of each child must be made.
BeginEdit()
Puts the current cell in edit mode.
Declaration
public bool BeginEdit()
Returns
System. Returns true if the process is successful. |
CancelEdit()
Close the currently active editor and discard changes.
Declaration
public bool CancelEdit()
Returns
System. true on successful cancellation. |
CloseEditor()
Ends the edit operation without committing the changes
Declaration
public bool CloseEditor()
Returns
System. true on success. |
CreateChildElements()
Called by the element when constructed. Allows inheritors to build the element tree.
Declaration
protected override void CreateChildElements()
Overrides
CreateEditorManager()
Returns an instance of Grid
Declaration
protected virtual GridViewEditManager CreateEditorManager()
Returns
Grid An instance of Grid |
CreateGroupPanelElement()
Creates the group panel element.
Declaration
protected virtual GroupPanelElement CreateGroupPanelElement()
Returns
CreatePagingPanelElement()
Creates the paging panel element.
Declaration
protected virtual PagingPanelElement CreatePagingPanelElement()
Returns
CreateTemplate()
Creates the template.
Declaration
protected virtual MasterGridViewTemplate CreateTemplate()
Returns
DisposeManagedResources()
Disposes all managed resources - such as Bitmaps, GDI+ objects, etc.
Declaration
protected override void DisposeManagedResources()
Overrides
EndEdit()
Commits any changes and ends the edit operation on the current cell.
Declaration
public bool EndEdit()
Returns
System. true on success. |
GetDragDropService()
Gets the drag drop service.
Declaration
public RadDragDropService GetDragDropService()
Returns
GetRowView(GridViewInfo)
Gets the row view.
Declaration
public IRowView GetRowView(GridViewInfo viewInfo)
Parameters
Grid The view info. |
Returns
GetRowViews(GridViewInfo)
Gets the row views.
Declaration
public IEnumerable<IRowView> GetRowViews(GridViewInfo viewInfo)
Parameters
Grid The view info. |
Returns
System.
|
GetService<T>()
Retrieves currently registered Rad
Declaration
public T GetService<T>()
where T : RadService
Returns
T
|
Type Parameters
T
A type derived from Rad |
Implements
HideColumnChooser()
InitializeFields()
Initializes member fields to their default values. This method is called prior the CreateChildItems one and allows for initialization of members on which child elements depend.
Declaration
protected override void InitializeFields()
Overrides
OnBoundsChanged(RadPropertyChangedEventArgs)
Raises the Bounds
Declaration
protected override void OnBoundsChanged(RadPropertyChangedEventArgs e)
Parameters
Rad The Rad |
Overrides
OnCellFormatting(Object, CellFormattingEventArgs)
Raises the Cell
Declaration
protected virtual void OnCellFormatting(object sender, CellFormattingEventArgs e)
Parameters
System. The cell that needs formatting. |
Cell A Cell |
See Also
OnCellMerging(GridViewCellMergingEventArgs)
Raises the Cell
Declaration
protected virtual void OnCellMerging(GridViewCellMergingEventArgs e)
Parameters
Grid A Grid |
See Also
OnColumnChooserCreated(Object, ColumnChooserCreatedEventArgs)
Called when the column chooser is created.
Declaration
protected virtual void OnColumnChooserCreated(object sender, ColumnChooserCreatedEventArgs e)
Parameters
System. The sender. |
Column The Column |
OnCreateCell(Object, GridViewCreateCellEventArgs)
Raises the Create
Declaration
protected virtual void OnCreateCell(object sender, GridViewCreateCellEventArgs e)
Parameters
System. The owner control. |
Grid An instance of Grid |
OnCreateRow(Object, GridViewCreateRowEventArgs)
Raises the Create
Declaration
protected virtual void OnCreateRow(object sender, GridViewCreateRowEventArgs e)
Parameters
System. The owner control. |
Grid An instance of Grid |
OnCurrentViewChanged(GridViewCurrentViewChangedEventArgs)
Raises the Current
Declaration
protected virtual void OnCurrentViewChanged(GridViewCurrentViewChangedEventArgs e)
Parameters
Grid A Grid |
OnLoaded()
Called when the element is loaded.
Declaration
protected override void OnLoaded()
Overrides
OnRowFormatting(Object, RowFormattingEventArgs)
Raises the Row
Declaration
protected void OnRowFormatting(object sender, RowFormattingEventArgs e)
Parameters
System. The row that needs formatting. |
Row A Row |
See Also
OnUserChangedCurrentRow(Object, EventArgs)
Called when the user changed current row.
Declaration
protected virtual void OnUserChangedCurrentRow(object sender, EventArgs e)
Parameters
System. The sender. |
System. The System. |
OnViewCellFormatting(Object, CellFormattingEventArgs)
Raises the View
Declaration
protected virtual void OnViewCellFormatting(object sender, CellFormattingEventArgs e)
Parameters
System. The grid cell that needs formatting. |
Cell A Cell |
See Also
OnViewRowFormatting(Object, RowFormattingEventArgs)
Raises the View
Declaration
protected void OnViewRowFormatting(object sender, RowFormattingEventArgs e)
Parameters
System. The row that needs formatting. |
Row A Row |
See Also
ProcessTemplatePropertyChangedEvent(GridViewEvent)
Declaration
protected virtual GridViewEventResult ProcessTemplatePropertyChangedEvent(GridViewEvent eventData)
Parameters
Grid
|
Returns
ProcessTemplatePropertyChanging(GridViewEvent)
Declaration
protected virtual GridViewEventResult ProcessTemplatePropertyChanging(GridViewEvent eventData)
Parameters
Grid
|
Returns
ProcessViewChangedEvent(GridViewEvent)
Processes the view changed event.
Declaration
protected virtual GridViewEventResult ProcessViewChangedEvent(GridViewEvent eventData)
Parameters
Grid The event data. |
Returns
RegisterService(RadService)
Registers the specified service.
Declaration
public void RegisterService(RadService service)
Parameters
Rad An instance of type derived from Rad |
Implements
ShowColumnChooser()
Shows the Grid
Declaration
public void ShowColumnChooser()
See Also
ShowColumnChooser(GridViewTemplate)
Shows the Grid
Declaration
public void ShowColumnChooser(GridViewTemplate template)
Parameters
Grid The template which columns will be shown for. |
See Also
Events
CellFormatting
Fires when the content of a data cell needs to be formatted for display.
Declaration
public event CellFormattingEventHandler CellFormatting
Event Type
See Also
CellMerging
Fires when the two neighbor cells are compared and about to be merged.
Declaration
public event GridViewCellMergingEventHandler CellMerging
Event Type
See Also
ColumnChooserCreated
Fires when a ColumnChooserCreated is created.
Declaration
public event ColumnChooserCreatedEventHandler ColumnChooserCreated
Event Type
CreateCell
Fires when a cell needs to be created.
Declaration
public event GridViewCreateCellEventHandler CreateCell
Event Type
CreateRow
Fires when a row needs to be created.
Declaration
public event GridViewCreateRowEventHandler CreateRow
Event Type
CurrentViewChanged
Fires when the current view in RadGridView has changed.
Declaration
public event GridViewCurrentViewChangedEventHandler CurrentViewChanged
Event Type
RowFormatting
Fires when a data row is invalidated and needs to be formatted.
Declaration
public event RowFormattingEventHandler RowFormatting
Event Type
Examples
void radGridView1_RowFormatting(object sender, RowFormattingEventArgs e)
{
if (e.RowElement.RowInfo.Cells.Count > 0 && (string)e.RowElement.RowInfo.Cells[0].Value == "3")
e.RowElement.Font = strikeoutFont;
else
e.RowElement.Font = SystemFonts.DialogFont;
}
See Also
ViewCellFormatting
Fires when the content of any grid cell needs to be formatted for display.
Declaration
public event CellFormattingEventHandler ViewCellFormatting
Event Type
See Also
ViewRowFormatting
Fires when a grid row is invalidated and needs to be formatted.
Declaration
public event RowFormattingEventHandler ViewRowFormatting
Event Type
See Also
Explicit Interface Implementations
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
|