RadGridViewElement
Represents the element for RadGridView.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.GridView.dll
Syntax:
public class RadGridViewElement : GridVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider, IRadServiceProvider, IGridViewEventListener
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementGridVisualElementRadGridViewElement...
Implements:
Inherited Members
Constructors
Initializes a new instance of the RadGridViewElement class. Sets up the grid navigator and initializes core functionality for the grid element.
public RadGridViewElement()
Properties
Gets the active editor
[Browsable(false)]
public IInputEditor ActiveEditor { get; }
Gets or sets a value indicating whether row heights will automatically expand to accommodate multiline cell text.
[Browsable(true)]
public bool AutoSizeRows { get; set; }
Gets or sets a value indicating how the user can initiate cell editing in the grid.
[Browsable(true)]
public RadGridViewBeginEditMode BeginEditMode { get; set; }
Gets the current column chooser
[Browsable(false)]
public GridViewColumnChooser ColumnChooser { get; }
Gets or sets the column chooser sort order.
[Browsable(false)]
public RadSortOrder ColumnChooserSortOrder { get; set; }
The column chooser sort order.
Gets an instance of GridViewContextMenuManager or the instance that implements IContextMenuManager interface.
[Browsable(false)]
public virtual IContextMenuManager ContextMenuManager { get; }
Gets the currently active cell in the grid view.
[Browsable(false)]
public GridDataCellElement CurrentCell { get; }
Gets or sets the currently selected column in the active grid view.
[Browsable(false)]
public GridViewColumn CurrentColumn { get; set; }
Gets or sets the currently selected row in the active grid view.
[Browsable(false)]
public GridViewRowInfo CurrentRow { get; set; }
Gets or sets the current row view responsible for displaying data in the grid.
public IRowView CurrentView { get; set; }
Gets an instance of GridViewEditManager that defines how to initialize and create cells and editors.
[Browsable(false)]
public GridViewEditManager EditorManager { get; set; }
Gets or sets a value indicating whether the PaintCell and PaintRow events are enabled.
[Browsable(true)]
public bool EnableCustomDrawing { get; set; }
Gets or sets value indicating the behavior when the user presses Enter while adding new row.
[Browsable(true)]
public RadGridViewEnterKeyMode EnterKeyMode { get; set; }
Gets or sets an instance of BaseGridBehavior or the instance that implements IGridBehavior interface.
[Browsable(false)]
public virtual IGridBehavior GridBehavior { get; set; }
Gets or sets the animation effect used when expanding or collapsing grouped rows.
public GridExpandAnimationType GroupExpandAnimationType { get; set; }
Gets the group panel element used for displaying grouped columns and allowing drag-drop grouping operations.
public GroupPanelElement GroupPanelElement { get; }
Gets or sets a value indicating whether the selected item remains highlighted when the control loses focus. When true, selection is hidden when focus is lost; when false, selection remains visible even when the control is not focused.
[Browsable(true)]
public bool HideSelection { get; set; }
Gets a value indicating whether any cell in the grid is currently in edit mode.
[Browsable(false)]
public bool IsInEditMode { get; }
Gets an instance of IGridNavigator used to navigate between rows and cells in grid.
public IGridNavigator Navigator { get; set; }
Gets or sets value indicating the behavior when the user presses Enter while adding new row.
[Browsable(true)]
public RadGridViewNewRowEnterKeyMode NewRowEnterKeyMode { get; set; }
Gets the paging panel element used for data pagination controls and navigation.
public PagingPanelElement PagingPanelElement { get; }
Gets the main layout panel used to arrange the grid's child elements.
public DockLayoutPanel Panel { get; }
Gets or sets a value indicating whether to show cell errors.
[Browsable(true)]
public bool ShowCellErrors { get; set; }
Gets or sets value indicating whether the GridGroupPanel is visible.
[Browsable(true)]
public bool ShowGroupPanel { get; set; }
Gets or sets a value indicating whether the group panel displays scrollbars or expands to show all group headers.
[Browsable(true)]
public bool ShowGroupPanelScrollbars { get; set; }
Gets or sets the text to use when there is no data.
[Browsable(true)]
public bool ShowNoDataText { get; set; }
Gets or sets a value indicating whether to show row errors.
[Browsable(true)]
public bool ShowRowErrors { get; set; }
Gets or sets a value indicating how to split RadGridView.
[Browsable(true)]
public RadGridViewSplitMode SplitMode { get; set; }
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.
[Browsable(true)]
public bool StandardTab { get; set; }
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.
[Browsable(true)]
public bool SynchronizeCurrentRowInSplitMode { get; set; }
Gets the core table element responsible for rendering the grid data. This is an advanced property intended for internal use or customization scenarios.
[Browsable(false)]
public GridTableElement TableElement { get; }
Gets the master template that defines the structure and behavior of the grid view.
public MasterGridViewTemplate Template { get; }
Gets the visual element used to display the grid title.
public LightVisualElement TitleLabelElement { get; }
Gets or sets the docking position of the grid title within the control.
public Dock TitlePosition { get; set; }
Gets or sets the text displayed in the grid title. When set to null or empty string, the title element will be collapsed.
public string TitleText { get; set; }
Gets or sets a value indicating whether each hierarchical level should display its own dedicated vertical scrollbar.
public bool UseScrollbarsInHierarchy { get; set; }
Methods
Arranges the RadElement to its final location. The element must call the Arrange method of each of its children.
protected override SizeF ArrangeOverride(SizeF finalSize)
The size that is available for element.
Returns:The rectangle occupied by the element. Usually finalSize. Should you return different size, the Layout system will restart measuring and rearranging the items. That could lead to infinite recursion.
Overrides:
In this method call to the Arrange method of each child must be made.
Puts the current cell in edit mode.
Close the currently active editor and discard changes.
Ends the edit operation without committing the changes
Creates and initializes the child elements of the RadGridViewElement. This method is called during the element's construction process and sets up the internal visual hierarchy.
protected override void CreateChildElements()
Overrides:
Returns an instance of GridViewEditManager that defines how to initialize and create cells and editors.
protected virtual GridViewEditManager CreateEditorManager()
An instance of GridViewEditManager
Creates the group panel element used for column grouping functionality.
protected virtual GroupPanelElement CreateGroupPanelElement()
A new instance of the GroupPanelElement class.
Creates the paging panel element used for data pagination functionality.
protected virtual PagingPanelElement CreatePagingPanelElement()
A new instance of the PagingPanelElement class.
Creates the template.
protected virtual MasterGridViewTemplate CreateTemplate()
A new instance of the MasterGridViewTemplate class.
Disposes all managed resources used by this element, including event handlers, column choosers, and template listeners.
protected override void DisposeManagedResources()
Overrides:
Commits any changes and ends the edit operation on the current cell.
Gets the drag drop service.
Gets the row view.
public IRowView GetRowView(GridViewInfo viewInfo)
The view info.
Returns:Gets the row views.
public IEnumerable<IRowView> GetRowViews(GridViewInfo viewInfo)
The view info.
Returns:IEnumerable<IRowView>
Retrieves currently registered RadService by the specified type.
public T GetService<T>() where T : RadService
T
Implements:
Hides the GridViewColumnChooser
public void HideColumnChooser()
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.
protected override void InitializeFields()
Overrides:
Raises the event.
protected override void OnBoundsChanged(RadPropertyChangedEventArgs e)
The RadPropertyChangedEventArgs instance containing the event data.
Overrides:
Raises the CellFormatting event
protected virtual void OnCellFormatting(object sender, CellFormattingEventArgs e)
The cell that needs formatting.
eCellFormattingEventArgsA CellFormattingEventArgs instance containing event data.
Raises the CellMerging event
protected virtual void OnCellMerging(GridViewCellMergingEventArgs e)
A GridViewCellMergingEventArgsinstance containing event data.
Called when the column chooser is created.
protected virtual void OnColumnChooserCreated(object sender, ColumnChooserCreatedEventArgs e)
The sender.
eColumnChooserCreatedEventArgsThe ColumnChooserCreatedEventArgs instance containing the event data.
Raises the CreateCell event.
protected virtual void OnCreateCell(object sender, GridViewCreateCellEventArgs e)
The owner control.
eGridViewCreateCellEventArgsAn instance of GridViewCreateCellEventArgs containing event data.
Raises the CreateRow event.
protected virtual void OnCreateRow(object sender, GridViewCreateRowEventArgs e)
The owner control.
eGridViewCreateRowEventArgsAn instance of GridViewCreateRowEventArgs containing event data.
Raises the CurrentViewChanged event
protected virtual void OnCurrentViewChanged(GridViewCurrentViewChangedEventArgs e)
A GridViewCurrentViewChangedEventArgsinstance containing event data.
Called when the element is loaded into the element tree. Initializes binding context and event handlers.
protected override void OnLoaded()
Overrides:
Raises the RowFormatting event.
protected void OnRowFormatting(object sender, RowFormattingEventArgs e)
The row that needs formatting.
eRowFormattingEventArgsA RowFormattingEventArgs instance containing event data.
Raises the ViewCellFormatting event
protected virtual void OnViewCellFormatting(object sender, CellFormattingEventArgs e)
The grid cell that needs formatting.
eCellFormattingEventArgsA CellFormattingEventArgsinstance containing event data.
Raises the ViewRowFormatting event.
protected void OnViewRowFormatting(object sender, RowFormattingEventArgs e)
The row that needs formatting.
eRowFormattingEventArgsA RowFormattingEventArgs instance containing event data.
protected virtual GridViewEventResult ProcessTemplatePropertyChangedEvent(GridViewEvent eventData)
protected virtual GridViewEventResult ProcessTemplatePropertyChanging(GridViewEvent eventData)
Processes the view changed event.
protected virtual GridViewEventResult ProcessViewChangedEvent(GridViewEvent eventData)
The event data.
Returns:Registers the specified service.
public void RegisterService(RadService service)
An instance of type derived from RadService.
Implements:
Shows the GridViewColumnChooser for the columns of the master view template.
public void ShowColumnChooser()
Shows the GridViewColumnChooser.
public void ShowColumnChooser(GridViewTemplate template)
The template which columns will be shown for.
Events
Fires when the content of a data cell needs to be formatted for display.
[Browsable(true)]
public event CellFormattingEventHandler CellFormatting
Fires when the two neighbor cells are compared and about to be merged.
[Browsable(true)]
public event GridViewCellMergingEventHandler CellMerging
Fires when a ColumnChooserCreated is created.
[Browsable(true)]
public event ColumnChooserCreatedEventHandler ColumnChooserCreated
Fires when a cell needs to be created.
[Browsable(true)]
public event GridViewCreateCellEventHandler CreateCell
Fires when a row needs to be created.
[Browsable(true)]
public event GridViewCreateRowEventHandler CreateRow
Fires when the current view in RadGridView has changed.
[Browsable(true)]
public event GridViewCurrentViewChangedEventHandler CurrentViewChanged
Fires when a data row is invalidated and needs to be formatted.
[Browsable(true)]
public event RowFormattingEventHandler RowFormatting
Fires when the content of any grid cell needs to be formatted for display.
[Browsable(true)]
public event CellFormattingEventHandler ViewCellFormatting
Fires when a grid row is invalidated and needs to be formatted.
[Browsable(true)]
public event RowFormattingEventHandler ViewRowFormatting