menu

WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GridCellComboBoxRenderer - WPF API Reference | Syncfusion

    Show / Hide Table of Contents

    Class GridCellComboBoxRenderer

    Represents the class that loads the ComboBox as editor for GridComboBoxColumn.

    Inheritance
    System.Object
    GridCellRendererBase
    GridVirtualizingCellRendererBase<System.Windows.Controls.ContentControl, System.Windows.Controls.ComboBox>
    GridVirtualizingCellRenderer<System.Windows.Controls.ContentControl, System.Windows.Controls.ComboBox>
    GridCellComboBoxRenderer
    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.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<ContentControl, ComboBox>.CurrentRendererValueChanged()
    GridVirtualizingCellRenderer<ContentControl, ComboBox>.EditorType
    GridVirtualizingCellRenderer<ContentControl, ComboBox>.OnInitializeDisplayElement(DataColumnBase, ContentControl, Object)
    GridVirtualizingCellRenderer<ContentControl, ComboBox>.OnInitializeEditElement(DataColumnBase, ComboBox, Object)
    GridVirtualizingCellRenderer<ContentControl, ComboBox>.OnInitializeTemplateElement(DataColumnBase, ContentControl, Object)
    GridVirtualizingCellRenderer<ContentControl, ComboBox>.OnUpdateDisplayBinding(DataColumnBase, ContentControl, Object)
    GridVirtualizingCellRenderer<ContentControl, ComboBox>.OnUpdateEditBinding(DataColumnBase, ComboBox, Object)
    GridVirtualizingCellRenderer<ContentControl, ComboBox>.OnUpdateTemplateBinding(DataColumnBase, ContentControl, Object)
    GridVirtualizingCellRenderer<ContentControl, ComboBox>.ShouldGridTryToHandleKeyDown(KeyEventArgs)
    GridVirtualizingCellRenderer<ContentControl, ComboBox>.TextAlignmentToHorizontalAlignment(TextAlignment)
    GridVirtualizingCellRenderer<ContentControl, ComboBox>.UpdateToolTip(DataColumnBase)
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.AllowRecycle
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.BeginEdit(RowColumnIndex, FrameworkElement, GridColumn, Object)
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.ClearRecycleBin()
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.DisplayRecycleBin
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.Dispose(Boolean)
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.DrawFormattedText(DrawingContext, Rect, Geometry, DataColumnBase, GridCell, String)
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.DrawGlyphs(DrawingContext, Rect, Geometry, DataColumnBase, GridCell, String)
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.EditRecycleBin
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.EndEdit(DataColumnBase, Object, Boolean)
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.InitializeCellStyle(DataColumnBase, Object)
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.InitializeDisplayElement(DataColumnBase, ContentControl, Object)
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.InitializeEditElement(DataColumnBase, ComboBox, Object)
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.InitializeTemplateElement(DataColumnBase, ContentControl, Object)
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.OnArrange(RowColumnIndex, FrameworkElement, Rect)
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.OnCreateDisplayUIElement()
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.OnCreateEditUIElement()
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.OnCreateTemplateUIElement()
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.OnEditElementLoaded(Object, RoutedEventArgs)
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.OnEditElementLostFocus(Object, RoutedEventArgs)
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.OnEditElementUnloaded(Object, RoutedEventArgs)
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.OnEditingComplete(DataColumnBase, FrameworkElement)
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.OnEnteredEditMode(DataColumnBase, FrameworkElement)
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.OnMeasure(RowColumnIndex, FrameworkElement, Size)
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.OnPrepareUIElements(DataColumnBase, Object, Boolean)
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.OnRenderCell(DrawingContext, Rect, DataColumnBase, Object)
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.OnRenderCellBorder(DrawingContext, Rect, Geometry, DataColumnBase, GridCell)
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.OnRenderContent(DrawingContext, Rect, Geometry, DataColumnBase, GridCell, Object)
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.OnRenderCurrentCell(DrawingContext, Rect, Geometry, DataColumnBase, GridCell)
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.OnUnloadUIElements(DataColumnBase)
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.OnUnwireDisplayUIElement(ContentControl)
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.OnUnwireEditUIElement(ComboBox)
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.OnUnwireTemplateUIElement(ContentControl)
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.OnUpdateBindingInfo(DataColumnBase, Object, Boolean)
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.OnUpdateStyleInfo(DataColumnBase, Object)
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.OnWireDisplayUIElement(ContentControl)
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.OnWireEditUIElement(ComboBox)
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.OnWireTemplateUIElement(ContentControl)
    GridVirtualizingCellRendererBase<ContentControl, ComboBox>.TemplateRecycleBin
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.UI.Xaml.Grid.Cells
    Assembly: Syncfusion.SfGrid.WPF.dll
    Syntax
    public class GridCellComboBoxRenderer : GridVirtualizingCellRenderer<ContentControl, ComboBox>, IGridCellRenderer, IDisposable
    Examples
    this.sfDataGrid.CellRenderers.Remove("ComboBox");
    this.sfDataGrid.CellRenderers.Add("ComboBox", new GridCellComboBoxRendererExt());
    public class GridCellComboBoxRendererExt : GridCellComboBoxRenderer
    {
       public override void OnInitializeDisplayElement(DataColumnBase dataColumn, ContentControl uiElement, object dataContext)
       {
           base.OnInitializeDisplayElement(dataColumn, uiElement, dataContext);
           uiElement.Foreground = new SolidColorBrush(Colors.DarkOrange);
       }
    }

    Constructors

    GridCellComboBoxRenderer()

    Initializes a new instance of the GridCellComboBoxRenderer class.

    Declaration
    public GridCellComboBoxRenderer()

    Fields

    lastKeyPressed

    Declaration
    public Key? lastKeyPressed
    Field Value
    Type
    System.Nullable<System.Windows.Input.Key>

    Methods

    EndEdit(DataColumnBase, Object, Boolean)

    Ends the edit occuring on the cell.

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

    Specifies the DataColumnBase.

    System.Object record

    Specifies the record.

    System.Boolean canResetBinding

    Indicates whether binding can be reset or not.

    Returns
    Type Description
    System.Boolean

    True if the edit ends on the cell; otherwise false.

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

    GetControlValue()

    Gets the control value of the cell.

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

    The control value of the cell.

    Overrides
    GridCellRendererBase.GetControlValue()

    InitializeDisplayElement(DataColumnBase, ContentControl, Object)

    Declaration
    public override void InitializeDisplayElement(DataColumnBase dataColumn, ContentControl uiElement, object dataContext)
    Parameters
    Type Name Description
    DataColumnBase dataColumn
    System.Windows.Controls.ContentControl uiElement
    System.Object dataContext
    Overrides
    Syncfusion.UI.Xaml.Grid.Cells.GridVirtualizingCellRendererBase<System.Windows.Controls.ContentControl, System.Windows.Controls.ComboBox>.InitializeDisplayElement(Syncfusion.UI.Xaml.Grid.DataColumnBase, System.Windows.Controls.ContentControl, System.Object)

    OnCreateDisplayUIElement()

    Creates a new UIElement for the display mode of cell.

    Declaration
    protected override ContentControl OnCreateDisplayUIElement()
    Returns
    Type Description
    System.Windows.Controls.ContentControl

    The new UIElement for the display mode of cell.

    Overrides
    Syncfusion.UI.Xaml.Grid.Cells.GridVirtualizingCellRendererBase<System.Windows.Controls.ContentControl, System.Windows.Controls.ComboBox>.OnCreateDisplayUIElement()

    OnCreateEditUIElement()

    Creates a new UIElement for the edit mode of cell.

    Declaration
    protected override ComboBox OnCreateEditUIElement()
    Returns
    Type Description
    System.Windows.Controls.ComboBox

    Returns the new UIElement for edit mode of cell.

    Overrides
    Syncfusion.UI.Xaml.Grid.Cells.GridVirtualizingCellRendererBase<System.Windows.Controls.ContentControl, System.Windows.Controls.ComboBox>.OnCreateEditUIElement()

    OnEditElementLoaded(Object, RoutedEventArgs)

    Invoked when the edit element is loaded on the cell in column.

    Declaration
    protected override void OnEditElementLoaded(object sender, RoutedEventArgs e)
    Parameters
    Type Name Description
    System.Object sender

    The sender.

    System.Windows.RoutedEventArgs e

    The System.Windows.RoutedEventArgs instance containing the event data.

    Overrides
    Syncfusion.UI.Xaml.Grid.Cells.GridVirtualizingCellRendererBase<System.Windows.Controls.ContentControl, System.Windows.Controls.ComboBox>.OnEditElementLoaded(System.Object, System.Windows.RoutedEventArgs)

    OnEnteredEditMode(DataColumnBase, FrameworkElement)

    Invoked when the cell is being entered the edit mode.

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

    Specifies the corresponding DataColumnBase.

    System.Windows.FrameworkElement currentRendererElement

    Specifies the current renderer element.

    Overrides
    Syncfusion.UI.Xaml.Grid.Cells.GridVirtualizingCellRendererBase<System.Windows.Controls.ContentControl, System.Windows.Controls.ComboBox>.OnEnteredEditMode(Syncfusion.UI.Xaml.Grid.DataColumnBase, System.Windows.FrameworkElement)

    OnInitializeDisplayElement(DataColumnBase, ContentControl, Object)

    Method which initialize the display element of the column.

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

    Specifies the DataColumnBase.

    System.Windows.Controls.ContentControl uiElement

    Specifies the corresponding renderer element.

    System.Object dataContext

    Specifies the data context.

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

    OnInitializeEditElement(DataColumnBase, ComboBox, Object)

    Method which is used to initialize the renderer element bindings with corresponding column values.

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

    Specifies the DataColumnBase.

    System.Windows.Controls.ComboBox uiElement

    Specifies the corresponding renderer element.

    System.Object dataContext

    Specifies the data context of the cell.

    Overrides
    Syncfusion.UI.Xaml.Grid.Cells.GridVirtualizingCellRenderer<System.Windows.Controls.ContentControl, System.Windows.Controls.ComboBox>.OnInitializeEditElement(Syncfusion.UI.Xaml.Grid.DataColumnBase, System.Windows.Controls.ComboBox, System.Object)

    OnRenderContent(DrawingContext, Rect, Geometry, DataColumnBase, GridCell, Object)

    Declaration
    protected override void OnRenderContent(DrawingContext dc, Rect cellRect, Geometry clipGeometry, DataColumnBase dataColumnBase, GridCell gridCell, object dataContext)
    Parameters
    Type Name Description
    System.Windows.Media.DrawingContext dc
    System.Windows.Rect cellRect
    System.Windows.Media.Geometry clipGeometry
    DataColumnBase dataColumnBase
    GridCell gridCell
    System.Object dataContext
    Overrides
    Syncfusion.UI.Xaml.Grid.Cells.GridVirtualizingCellRendererBase<System.Windows.Controls.ContentControl, System.Windows.Controls.ComboBox>.OnRenderContent(System.Windows.Media.DrawingContext, System.Windows.Rect, System.Windows.Media.Geometry, Syncfusion.UI.Xaml.Grid.DataColumnBase, Syncfusion.UI.Xaml.Grid.GridCell, System.Object)

    OnUnwireEditUIElement(ComboBox)

    Unwires the events associated with edit UIElement

    Declaration
    protected override void OnUnwireEditUIElement(ComboBox uiElement)
    Parameters
    Type Name Description
    System.Windows.Controls.ComboBox uiElement

    Specifies the corresponding UIElement.

    Overrides
    Syncfusion.UI.Xaml.Grid.Cells.GridVirtualizingCellRendererBase<System.Windows.Controls.ContentControl, System.Windows.Controls.ComboBox>.OnUnwireEditUIElement(System.Windows.Controls.ComboBox)

    SetControlValue(Object)

    Sets the control value of the cell.

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

    Specifies the value to set the control value of the cell.

    Overrides
    GridCellRendererBase.SetControlValue(Object)
    Exceptions
    Type Condition
    System.Exception

    Thrown when value cannot be set for Unloaded editor.

    ShouldGridTryToHandleKeyDown(KeyEventArgs)

    Handles the key interaction with editor of corresponding column.

    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 parent grid should be allowed to handle keys; otherwise false.

    Overrides
    Syncfusion.UI.Xaml.Grid.Cells.GridVirtualizingCellRenderer<System.Windows.Controls.ContentControl, System.Windows.Controls.ComboBox>.ShouldGridTryToHandleKeyDown(System.Windows.Input.KeyEventArgs)

    Implements

    IGridCellRenderer
    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved