alexa
menu

WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download

    Show / Hide Table of Contents

    Class GridCellMultiColumnDropDownRenderer

    Represents the class that loads the SfMultiColumnDropDownControl as the editor element for the GridMultiColumnDropDownList column in SfDataGrid.

    Inheritance
    System.Object
    GridCellRendererBase
    GridVirtualizingCellRendererBase<System.Windows.Controls.TextBlock, SfMultiColumnDropDownControl>
    GridVirtualizingCellRenderer<System.Windows.Controls.TextBlock, SfMultiColumnDropDownControl>
    GridCellMultiColumnDropDownRenderer
    Implements
    IGridCellRenderer
    System.IDisposable
    Inherited Members
    GridCellRendererBase.Arrange(RowColumnIndex, FrameworkElement, Rect)
    GridCellRendererBase.BeginEdit(RowColumnIndex, FrameworkElement, GridColumn, Object)
    GridCellRendererBase.BindingExpression
    GridCellRendererBase.CanUpdateBinding(GridColumn)
    GridCellRendererBase.CanValidate()
    GridCellRendererBase.ClearRecycleBin()
    GridCellRendererBase.CommitUnBoundCellValue(Object, GridColumn, Object)
    GridCellRendererBase.CurrentCellElement
    GridCellRendererBase.CurrentCellIndex
    GridCellRendererBase.CurrentCellRendererElement
    GridCellRendererBase.DataGrid
    GridCellRendererBase.Dispose()
    GridCellRendererBase.Dispose(Boolean)
    GridCellRendererBase.HasCurrentCellState
    GridCellRendererBase.IGridCellRenderer.ShouldGridTryToHandleKeyDown(KeyEventArgs)
    GridCellRendererBase.IGridCellRenderer.UpdateBindingInfo(DataColumnBase, Object, Boolean)
    GridCellRendererBase.IsDropDownable
    GridCellRendererBase.IsEditable
    GridCellRendererBase.IsFocused
    GridCellRendererBase.IsFocusible
    GridCellRendererBase.IsInEditing
    GridCellRendererBase.Measure(RowColumnIndex, FrameworkElement, Size)
    GridCellRendererBase.OnArrange(RowColumnIndex, FrameworkElement, Rect)
    GridCellRendererBase.OnMeasure(RowColumnIndex, FrameworkElement, Size)
    GridCellRendererBase.OnPrepareUIElements()
    GridCellRendererBase.OnPrepareUIElements(DataColumnBase, Object, Boolean)
    GridCellRendererBase.OnPreviewTextInput(TextCompositionEventArgs)
    GridCellRendererBase.OnRenderCell(DrawingContext, Rect, DataColumnBase, Object)
    GridCellRendererBase.OnRenderCellBorder(DrawingContext, Rect, Geometry, DataColumnBase, GridCell)
    GridCellRendererBase.OnRenderContent(DrawingContext, Rect, Geometry, DataColumnBase, GridCell, Object)
    GridCellRendererBase.OnRenderCurrentCell(DrawingContext, Rect, Geometry, DataColumnBase, GridCell)
    GridCellRendererBase.OnUnloadUIElements(DataColumnBase)
    GridCellRendererBase.OnUpdateBindingInfo(DataColumnBase, Object, Boolean)
    GridCellRendererBase.OnUpdateStyleInfo(DataColumnBase, Object)
    GridCellRendererBase.PrepareUIElements(DataColumnBase, Object, Boolean)
    GridCellRendererBase.PreviewInputText
    GridCellRendererBase.PreviewTextInput(TextCompositionEventArgs)
    GridCellRendererBase.RaiseCurrentCellValidatedEvent(SfDataGrid, GridColumn, Object, Object)
    GridCellRendererBase.RaiseCurrentCellValidatingEvent(SfDataGrid, GridColumn, Object, Object, Object)
    GridCellRendererBase.RaiseCurrentCellValueChangedEvent(SfDataGrid, DataColumnBase)
    GridCellRendererBase.RenderCell(DrawingContext, Rect, DataColumnBase, Object)
    GridCellRendererBase.ResetCurrentCellState()
    GridCellRendererBase.SetCurrentCellState(RowColumnIndex, FrameworkElement, Boolean, Boolean, GridColumn, DataColumnBase)
    GridCellRendererBase.SetFocus(Boolean)
    GridCellRendererBase.SetFocus(FrameworkElement, Boolean)
    GridCellRendererBase.SupportsRenderOptimization
    GridCellRendererBase.UnloadUIElements(DataColumnBase)
    GridCellRendererBase.UpdateBindingInfo(DataColumnBase, Object, Boolean)
    GridCellRendererBase.UpdateCellStyle(DataColumnBase, Object)
    GridCellRendererBase.UpdateCurrentCellState(FrameworkElement, Boolean)
    GridCellRendererBase.UpdateSource(FrameworkElement)
    GridCellRendererBase.UpdateToolTip(DataColumnBase)
    GridCellRendererBase.UseOnlyRendererElement
    GridVirtualizingCellRenderer<TextBlock, SfMultiColumnDropDownControl>.CurrentRendererValueChanged()
    GridVirtualizingCellRenderer<TextBlock, SfMultiColumnDropDownControl>.EditorType
    GridVirtualizingCellRenderer<TextBlock, SfMultiColumnDropDownControl>.OnInitializeDisplayElement(DataColumnBase, TextBlock, Object)
    GridVirtualizingCellRenderer<TextBlock, SfMultiColumnDropDownControl>.OnInitializeEditElement(DataColumnBase, SfMultiColumnDropDownControl, Object)
    GridVirtualizingCellRenderer<TextBlock, SfMultiColumnDropDownControl>.OnInitializeTemplateElement(DataColumnBase, ContentControl, Object)
    GridVirtualizingCellRenderer<TextBlock, SfMultiColumnDropDownControl>.OnUpdateDisplayBinding(DataColumnBase, TextBlock, Object)
    GridVirtualizingCellRenderer<TextBlock, SfMultiColumnDropDownControl>.OnUpdateEditBinding(DataColumnBase, SfMultiColumnDropDownControl, Object)
    GridVirtualizingCellRenderer<TextBlock, SfMultiColumnDropDownControl>.OnUpdateTemplateBinding(DataColumnBase, ContentControl, Object)
    GridVirtualizingCellRenderer<TextBlock, SfMultiColumnDropDownControl>.ShouldGridTryToHandleKeyDown(KeyEventArgs)
    GridVirtualizingCellRenderer<TextBlock, SfMultiColumnDropDownControl>.TextAlignmentToHorizontalAlignment(TextAlignment)
    GridVirtualizingCellRenderer<TextBlock, SfMultiColumnDropDownControl>.UpdateToolTip(DataColumnBase)
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.AllowRecycle
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.BeginEdit(RowColumnIndex, FrameworkElement, GridColumn, Object)
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.ClearRecycleBin()
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.DisplayRecycleBin
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.Dispose(Boolean)
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.DrawFormattedText(DrawingContext, Rect, Geometry, DataColumnBase, GridCell, String)
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.DrawGlyphs(DrawingContext, Rect, Geometry, DataColumnBase, GridCell, String)
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.EditRecycleBin
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.EndEdit(DataColumnBase, Object, Boolean)
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.InitializeCellStyle(DataColumnBase, Object)
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.InitializeDisplayElement(DataColumnBase, TextBlock, Object)
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.InitializeEditElement(DataColumnBase, SfMultiColumnDropDownControl, Object)
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.InitializeTemplateElement(DataColumnBase, ContentControl, Object)
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.OnArrange(RowColumnIndex, FrameworkElement, Rect)
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.OnCreateDisplayUIElement()
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.OnCreateEditUIElement()
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.OnCreateTemplateUIElement()
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.OnEditElementLoaded(Object, RoutedEventArgs)
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.OnEditElementLostFocus(Object, RoutedEventArgs)
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.OnEditElementUnloaded(Object, RoutedEventArgs)
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.OnEditingComplete(DataColumnBase, FrameworkElement)
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.OnEnteredEditMode(DataColumnBase, FrameworkElement)
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.OnMeasure(RowColumnIndex, FrameworkElement, Size)
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.OnPrepareUIElements(DataColumnBase, Object, Boolean)
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.OnRenderCell(DrawingContext, Rect, DataColumnBase, Object)
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.OnRenderCellBorder(DrawingContext, Rect, Geometry, DataColumnBase, GridCell)
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.OnRenderContent(DrawingContext, Rect, Geometry, DataColumnBase, GridCell, Object)
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.OnRenderCurrentCell(DrawingContext, Rect, Geometry, DataColumnBase, GridCell)
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.OnUnloadUIElements(DataColumnBase)
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.OnUnwireDisplayUIElement(TextBlock)
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.OnUnwireEditUIElement(SfMultiColumnDropDownControl)
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.OnUnwireTemplateUIElement(ContentControl)
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.OnUpdateBindingInfo(DataColumnBase, Object, Boolean)
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.OnUpdateStyleInfo(DataColumnBase, Object)
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.OnWireDisplayUIElement(TextBlock)
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.OnWireEditUIElement(SfMultiColumnDropDownControl)
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.OnWireTemplateUIElement(ContentControl)
    GridVirtualizingCellRendererBase<TextBlock, SfMultiColumnDropDownControl>.TemplateRecycleBin
    Namespace: Syncfusion.UI.Xaml.Grid.Cells
    Assembly: Syncfusion.SfGrid.WPF.dll
    Syntax
    public class GridCellMultiColumnDropDownRenderer : GridVirtualizingCellRenderer<TextBlock, SfMultiColumnDropDownControl>, IGridCellRenderer, IDisposable
    Remarks

    The GridCellMultiColumnDropDownRenderer is the default cell renderer registered with the key MultiColumnDropDown in the CellRenderers collection. It is used to render and edit the cells of GridMultiColumnDropDownList columns by displaying the selected value as a System.Windows.Controls.TextBlock in display mode and hosting a SfMultiColumnDropDownControl in edit mode.

    Constructors

    GridCellMultiColumnDropDownRenderer()

    Initializes a new instance of the GridCellMultiColumnDropDownRenderer class.

    Declaration
    public GridCellMultiColumnDropDownRenderer()
    Remarks

    The default constructor sets the property to true so that the SfMultiColumnDropDownControl drop-down can be opened when the cell enters edit mode.

    Methods

    EndEdit(DataColumnBase, Object, Boolean)

    Ends the editing of the current cell that hosts the SfMultiColumnDropDownControl editor and commits the edited value to the underlying record.

    Declaration
    public override bool EndEdit(DataColumnBase dc, object record, bool canResetBinding = false)
    Parameters
    Type Name Description
    DataColumnBase dc

    The DataColumnBase that contains the GridColumn, RowColumnIndex, and GridCell information for the renderer element.

    System.Object record

    The underlying record that corresponds to the cell being edited.

    System.Boolean canResetBinding

    A boolean value indicating whether the binding of the SelectedValue can be cleared while ending the edit operation.

    Returns
    Type Description
    System.Boolean

    Returns true if the edit operation is successfully ended; otherwise, false.

    Overrides
    Syncfusion.UI.Xaml.Grid.Cells.GridVirtualizingCellRendererBase<System.Windows.Controls.TextBlock, Syncfusion.UI.Xaml.Grid.SfMultiColumnDropDownControl>.EndEdit(Syncfusion.UI.Xaml.Grid.DataColumnBase, System.Object, System.Boolean)
    Remarks

    When canResetBinding is true, the binding of the SelectedValue property is cleared before delegating the call to the base implementation.

    GetControlValue()

    Returns the current value of the GridCellMultiColumnDropDownRenderer editor element.

    Declaration
    public override object GetControlValue()
    Returns
    Type Description
    System.Object

    Returns the SelectedValue when the cell is in edit mode; otherwise, returns the System.Windows.Controls.TextBlock.Text value of the display element.

    Overrides
    GridCellRendererBase.GetControlValue()
    Remarks

    If the current cell state is not initialized, the value returned by the base implementation is returned. This method is called by the SfDataGrid while committing the edited value of the cell to the underlying data source.

    OnCreateEditUIElement()

    Creates a new SfMultiColumnDropDownControl element to be used as the edit UI element for the GridMultiColumnDropDownList column.

    Declaration
    protected override SfMultiColumnDropDownControl OnCreateEditUIElement()
    Returns
    Type Description
    SfMultiColumnDropDownControl

    A new SfMultiColumnDropDownControl instance that is used as the editor element when the cell enters edit mode.

    Overrides
    Syncfusion.UI.Xaml.Grid.Cells.GridVirtualizingCellRendererBase<System.Windows.Controls.TextBlock, Syncfusion.UI.Xaml.Grid.SfMultiColumnDropDownControl>.OnCreateEditUIElement()
    Remarks

    Overrides the base implementation to provide a SfMultiColumnDropDownControl instance as the edit element. In the WPF platform, the border thickness of the control is reset to a thickness of 1 to match the appearance of the cell.

    OnEditElementLoaded(Object, RoutedEventArgs)

    Creates a new SfMultiColumnDropDownControl element to be used as the edit UI element for the GridMultiColumnDropDownList column.

    Declaration
    protected override void OnEditElementLoaded(object sender, RoutedEventArgs e)
    Parameters
    Type Name Description
    System.Object sender
    System.Windows.RoutedEventArgs e
    Overrides
    Syncfusion.UI.Xaml.Grid.Cells.GridVirtualizingCellRendererBase<System.Windows.Controls.TextBlock, Syncfusion.UI.Xaml.Grid.SfMultiColumnDropDownControl>.OnEditElementLoaded(System.Object, System.Windows.RoutedEventArgs)
    Remarks

    Overrides the base implementation to provide a SfMultiColumnDropDownControl instance as the edit element. In the WPF platform, the border thickness of the control is reset to a thickness of 1 to match the appearance of the cell.

    OnEnteredEditMode(DataColumnBase, FrameworkElement)

    Called when the GridCellMultiColumnDropDownRenderer cell has entered edit mode.

    Declaration
    protected override void OnEnteredEditMode(DataColumnBase dataColumn, FrameworkElement currentRendererElement)
    Parameters
    Type Name Description
    DataColumnBase dataColumn

    The DataColumnBase that contains the GridColumn, RowColumnIndex, and GridCell information for the renderer element.

    System.Windows.FrameworkElement currentRendererElement

    The System.Windows.FrameworkElement that represents the current edit element of the cell.

    Overrides
    Syncfusion.UI.Xaml.Grid.Cells.GridVirtualizingCellRendererBase<System.Windows.Controls.TextBlock, Syncfusion.UI.Xaml.Grid.SfMultiColumnDropDownControl>.OnEnteredEditMode(Syncfusion.UI.Xaml.Grid.DataColumnBase, System.Windows.FrameworkElement)
    Remarks

    Overrides the base implementation to disable the mouse input on the current renderer element in the WPF platform, so that the editor element receives all mouse interactions while the cell is being edited.

    OnInitializeDisplayElement(DataColumnBase, TextBlock, Object)

    Called when the display element is initialized for the GridMultiColumnDropDownList cell. Updates the padding of the System.Windows.Controls.TextBlock based on the padding defined on the GridColumn.

    Declaration
    public override void OnInitializeDisplayElement(DataColumnBase dataColumn, TextBlock uiElement, object dataContext)
    Parameters
    Type Name Description
    DataColumnBase dataColumn

    The DataColumnBase instance that holds the GridColumn, RowColumnIndex, and the GridCell information for the renderer element.

    System.Windows.Controls.TextBlock uiElement

    The System.Windows.Controls.TextBlock element that represents the display UI element.

    System.Object dataContext

    The data context of the cell, which is the underlying record being displayed.

    Overrides
    Syncfusion.UI.Xaml.Grid.Cells.GridVirtualizingCellRenderer<System.Windows.Controls.TextBlock, Syncfusion.UI.Xaml.Grid.SfMultiColumnDropDownControl>.OnInitializeDisplayElement(Syncfusion.UI.Xaml.Grid.DataColumnBase, System.Windows.Controls.TextBlock, System.Object)

    OnInitializeEditElement(DataColumnBase, SfMultiColumnDropDownControl, Object)

    Called when the edit element is initialized for the GridMultiColumnDropDownList cell. Initializes the SfMultiColumnDropDownControl with the bindings required for two-way data binding with the GridColumn.

    Declaration
    public override void OnInitializeEditElement(DataColumnBase dataColumn, SfMultiColumnDropDownControl uiElement, object dataContext)
    Parameters
    Type Name Description
    DataColumnBase dataColumn

    The DataColumnBase instance that holds the GridColumn, RowColumnIndex, and the GridCell information for the renderer element.

    SfMultiColumnDropDownControl uiElement

    The SfMultiColumnDropDownControl element that represents the edit UI element.

    System.Object dataContext

    The data context of the cell, which is the underlying record being edited.

    Overrides
    Syncfusion.UI.Xaml.Grid.Cells.GridVirtualizingCellRenderer<System.Windows.Controls.TextBlock, Syncfusion.UI.Xaml.Grid.SfMultiColumnDropDownControl>.OnInitializeEditElement(Syncfusion.UI.Xaml.Grid.DataColumnBase, Syncfusion.UI.Xaml.Grid.SfMultiColumnDropDownControl, System.Object)
    Remarks

    Sets up bindings for properties such as SelectedValue, DisplayMember, ValueMember, PopupWidth, PopupHeight, AllowAutoComplete, AllowIncrementalFiltering, SearchCondition, and other drop-down specific options exposed by the GridMultiColumnDropDownList column. The is stored for later use while committing the edited value.

    OnUnwireEditUIElement(SfMultiColumnDropDownControl)

    Unwires the SfMultiColumnDropDownControl edit element from the renderer when the cell leaves edit mode.

    Declaration
    protected override void OnUnwireEditUIElement(SfMultiColumnDropDownControl uiElement)
    Parameters
    Type Name Description
    SfMultiColumnDropDownControl uiElement

    The SfMultiColumnDropDownControl edit element to be unwired.

    Overrides
    Syncfusion.UI.Xaml.Grid.Cells.GridVirtualizingCellRendererBase<System.Windows.Controls.TextBlock, Syncfusion.UI.Xaml.Grid.SfMultiColumnDropDownControl>.OnUnwireEditUIElement(Syncfusion.UI.Xaml.Grid.SfMultiColumnDropDownControl)
    Remarks

    Detaches the SelectionChanged event handler that was wired in . In the WPF platform, the PreviewMouseDown handler is also detached to prevent memory leaks.

    SetControlValue(Object)

    Sets the value to the SfMultiColumnDropDownControl editor element of the GridMultiColumnDropDownList cell.

    Declaration
    public override void SetControlValue(object value)
    Parameters
    Type Name Description
    System.Object value

    The value to be assigned to the SelectedItem of the editor element.

    Overrides
    GridCellRendererBase.SetControlValue(Object)
    Remarks

    This method updates the SelectedItem of the editor element only when the cell is in edit mode. If the cell is not in edit mode, an exception is raised indicating that the value cannot be set for an unloaded editor.

    Exceptions
    Type Condition
    System.Exception

    Thrown when the editor element is not loaded.

    ShouldGridTryToHandleKeyDown(KeyEventArgs)

    Determines whether the SfDataGrid should attempt to handle the key down event raised while the SfMultiColumnDropDownControl cell is being edited.

    Declaration
    protected override bool ShouldGridTryToHandleKeyDown(KeyEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.KeyEventArgs e

    The System.Windows.Input.KeyEventArgs instance containing the event data.

    Returns
    Type Description
    System.Boolean

    Returns true if the SfDataGrid should handle the key down event; otherwise, returns false to let the inner editor of the SfMultiColumnDropDownControl process the key.

    Overrides
    Syncfusion.UI.Xaml.Grid.Cells.GridVirtualizingCellRenderer<System.Windows.Controls.TextBlock, Syncfusion.UI.Xaml.Grid.SfMultiColumnDropDownControl>.ShouldGridTryToHandleKeyDown(System.Windows.Input.KeyEventArgs)
    Remarks

    Overrides the base implementation to honor the navigation keys (such as System.Windows.Input.Key.Escape, System.Windows.Input.Key.Up, System.Windows.Input.Key.Down, System.Windows.Input.Key.PageUp, System.Windows.Input.Key.PageDown, and System.Windows.Input.Key.Enter) when the drop-down of the SfMultiColumnDropDownControl is open, and to route caret navigation keys to the grid based on the caret position and modifier keys.

    Implements

    IGridCellRenderer
    System.IDisposable

    See Also

    GridMultiColumnDropDownList
    CellRenderers
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved