menu

UWP

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

    Show / Hide Table of Contents

    Class GridCellTextBoxRenderer

    Represents a class that maintains the rendering of GridTextColumn.

    Inheritance
    System.Object
    GridCellRendererBase
    GridVirtualizingCellRendererBase<Windows.UI.Xaml.Controls.TextBlock, Windows.UI.Xaml.Controls.TextBox>
    GridVirtualizingCellRenderer<Windows.UI.Xaml.Controls.TextBlock, Windows.UI.Xaml.Controls.TextBox>
    GridCellTextBoxRenderer
    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(KeyRoutedEventArgs)
    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.OnUnloadUIElements(DataColumnBase)
    GridCellRendererBase.OnUpdateBindingInfo(DataColumnBase, Object, Boolean)
    GridCellRendererBase.OnUpdateStyleInfo(DataColumnBase, Object)
    GridCellRendererBase.PrepareUIElements(DataColumnBase, Object, Boolean)
    GridCellRendererBase.PreviewInputText
    GridCellRendererBase.PreviewTextInput(KeyRoutedEventArgs)
    GridCellRendererBase.RaiseCurrentCellValidatedEvent(SfDataGrid, GridColumn, Object, Object)
    GridCellRendererBase.RaiseCurrentCellValidatingEvent(SfDataGrid, GridColumn, Object, Object, Object)
    GridCellRendererBase.RaiseCurrentCellValueChangedEvent(SfDataGrid, DataColumnBase)
    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, TextBox>.CurrentRendererValueChanged()
    GridVirtualizingCellRenderer<TextBlock, TextBox>.EditorType
    GridVirtualizingCellRenderer<TextBlock, TextBox>.OnInitializeDisplayElement(DataColumnBase, TextBlock, Object)
    GridVirtualizingCellRenderer<TextBlock, TextBox>.OnInitializeEditElement(DataColumnBase, TextBox, Object)
    GridVirtualizingCellRenderer<TextBlock, TextBox>.OnInitializeTemplateElement(DataColumnBase, ContentControl, Object)
    GridVirtualizingCellRenderer<TextBlock, TextBox>.OnUpdateDisplayBinding(DataColumnBase, TextBlock, Object)
    GridVirtualizingCellRenderer<TextBlock, TextBox>.OnUpdateEditBinding(DataColumnBase, TextBox, Object)
    GridVirtualizingCellRenderer<TextBlock, TextBox>.OnUpdateTemplateBinding(DataColumnBase, ContentControl, Object)
    GridVirtualizingCellRenderer<TextBlock, TextBox>.ShouldGridTryToHandleKeyDown(KeyRoutedEventArgs)
    GridVirtualizingCellRenderer<TextBlock, TextBox>.TextAlignmentToHorizontalAlignment(TextAlignment)
    GridVirtualizingCellRenderer<TextBlock, TextBox>.UpdateToolTip(DataColumnBase)
    GridVirtualizingCellRendererBase<TextBlock, TextBox>.AllowRecycle
    GridVirtualizingCellRendererBase<TextBlock, TextBox>.BeginEdit(RowColumnIndex, FrameworkElement, GridColumn, Object)
    GridVirtualizingCellRendererBase<TextBlock, TextBox>.ClearRecycleBin()
    GridVirtualizingCellRendererBase<TextBlock, TextBox>.DisplayRecycleBin
    GridVirtualizingCellRendererBase<TextBlock, TextBox>.Dispose(Boolean)
    GridVirtualizingCellRendererBase<TextBlock, TextBox>.EditRecycleBin
    GridVirtualizingCellRendererBase<TextBlock, TextBox>.EndEdit(DataColumnBase, Object, Boolean)
    GridVirtualizingCellRendererBase<TextBlock, TextBox>.InitializeCellStyle(DataColumnBase, Object)
    GridVirtualizingCellRendererBase<TextBlock, TextBox>.InitializeDisplayElement(DataColumnBase, TextBlock, Object)
    GridVirtualizingCellRendererBase<TextBlock, TextBox>.InitializeEditElement(DataColumnBase, TextBox, Object)
    GridVirtualizingCellRendererBase<TextBlock, TextBox>.InitializeTemplateElement(DataColumnBase, ContentControl, Object)
    GridVirtualizingCellRendererBase<TextBlock, TextBox>.OnArrange(RowColumnIndex, FrameworkElement, Rect)
    GridVirtualizingCellRendererBase<TextBlock, TextBox>.OnCreateDisplayUIElement()
    GridVirtualizingCellRendererBase<TextBlock, TextBox>.OnCreateEditUIElement()
    GridVirtualizingCellRendererBase<TextBlock, TextBox>.OnCreateTemplateUIElement()
    GridVirtualizingCellRendererBase<TextBlock, TextBox>.OnEditElementLoaded(Object, RoutedEventArgs)
    GridVirtualizingCellRendererBase<TextBlock, TextBox>.OnEditElementLostFocus(Object, RoutedEventArgs)
    GridVirtualizingCellRendererBase<TextBlock, TextBox>.OnEditElementUnloaded(Object, RoutedEventArgs)
    GridVirtualizingCellRendererBase<TextBlock, TextBox>.OnEditingComplete(DataColumnBase, FrameworkElement)
    GridVirtualizingCellRendererBase<TextBlock, TextBox>.OnEnteredEditMode(DataColumnBase, FrameworkElement)
    GridVirtualizingCellRendererBase<TextBlock, TextBox>.OnMeasure(RowColumnIndex, FrameworkElement, Size)
    GridVirtualizingCellRendererBase<TextBlock, TextBox>.OnPrepareUIElements(DataColumnBase, Object, Boolean)
    GridVirtualizingCellRendererBase<TextBlock, TextBox>.OnUnloadUIElements(DataColumnBase)
    GridVirtualizingCellRendererBase<TextBlock, TextBox>.OnUnwireDisplayUIElement(TextBlock)
    GridVirtualizingCellRendererBase<TextBlock, TextBox>.OnUnwireEditUIElement(TextBox)
    GridVirtualizingCellRendererBase<TextBlock, TextBox>.OnUnwireTemplateUIElement(ContentControl)
    GridVirtualizingCellRendererBase<TextBlock, TextBox>.OnUpdateBindingInfo(DataColumnBase, Object, Boolean)
    GridVirtualizingCellRendererBase<TextBlock, TextBox>.OnUpdateStyleInfo(DataColumnBase, Object)
    GridVirtualizingCellRendererBase<TextBlock, TextBox>.OnWireDisplayUIElement(TextBlock)
    GridVirtualizingCellRendererBase<TextBlock, TextBox>.OnWireEditUIElement(TextBox)
    GridVirtualizingCellRendererBase<TextBlock, TextBox>.OnWireTemplateUIElement(ContentControl)
    GridVirtualizingCellRendererBase<TextBlock, TextBox>.TemplateRecycleBin
    Namespace: Syncfusion.UI.Xaml.Grid.Cells
    Assembly: Syncfusion.SfGrid.UWP.dll
    Syntax
    public class GridCellTextBoxRenderer : GridVirtualizingCellRenderer<TextBlock, TextBox>, IGridCellRenderer, IDisposable
    Examples
    this.sfDataGrid.CellRenderers.Remove("TextBox");
    this.sfDataGrid.CellRenderers.Add("TextBox", new GridCellTextBoxRendererExt());
    public class GridCellTextBoxRendererExt : GridCellTextBoxRenderer
    {
    
       public override void OnInitializeDisplayElement(DataColumnBase dataColumn, TextBlock uiElement, object dataContext)
       {
           base.OnInitializeDisplayElement(dataColumn, uiElement, dataContext);
    
           if (dataColumn.GridColumn.MappingName.Equals("CustomerID"))
               uiElement.Foreground = new SolidColorBrush(Colors.Blue);
       }
    
       public override void OnUpdateDisplayBinding(DataColumnBase dataColumn, TextBlock uiElement, object dataContext)
       {
           base.OnUpdateDisplayBinding(dataColumn, uiElement, dataContext);
    
           if (dataColumn.GridColumn.MappingName.Equals("CustomerID"))
               uiElement.Foreground = new SolidColorBrush(Colors.Blue);
       }
    }

    Constructors

    GridCellTextBoxRenderer()

    Declaration
    public GridCellTextBoxRenderer()

    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 corresponding DataColumnBase.

    System.Object record

    Specifies the corresponding 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<Windows.UI.Xaml.Controls.TextBlock, Windows.UI.Xaml.Controls.TextBox>.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

    Returns the control value of the cell.

    Overrides
    GridCellRendererBase.GetControlValue()

    OnEditElementLoaded(Object, RoutedEventArgs)

    Invoked when the edit element(TextBox) 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.

    Windows.UI.Xaml.RoutedEventArgs e

    The Windows.UI.Xaml.RoutedEventArgs instance containing the event data.

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

    OnEditElementUnloaded(Object, RoutedEventArgs)

    Invoked when the edit element(TextBox) is unloaded on the cell in column.

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

    The sender.

    Windows.UI.Xaml.RoutedEventArgs e

    The Windows.UI.Xaml.RoutedEventArgs instance containing the event data.

    Overrides
    Syncfusion.UI.Xaml.Grid.Cells.GridVirtualizingCellRendererBase<Windows.UI.Xaml.Controls.TextBlock, Windows.UI.Xaml.Controls.TextBox>.OnEditElementUnloaded(System.Object, Windows.UI.Xaml.RoutedEventArgs)

    OnInitializeDisplayElement(DataColumnBase, TextBlock, Object)

    Method which initialize the display element of the column.

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

    Specifies the DataColumnBase.

    Windows.UI.Xaml.Controls.TextBlock uiElement

    Specifies the corresponding renderer element

    System.Object dataContext

    Specifies the data context of the cell.

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

    OnInitializeEditElement(DataColumnBase, TextBox, Object)

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

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

    Specifies the corresponding DataColumnBase.

    Windows.UI.Xaml.Controls.TextBox uiElement

    Specifies the corresponding renderer element.

    System.Object dataContext

    Specifies the data context of the cell.

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

    OnPreviewTextInput(KeyRoutedEventArgs)

    Raises the event.

    Declaration
    protected override void OnPreviewTextInput(KeyRoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.Input.KeyRoutedEventArgs e

    The Windows.UI.Xaml.Input.KeyRoutedEventArgs instance containing the event data.

    Overrides
    GridCellRendererBase.OnPreviewTextInput(KeyRoutedEventArgs)

    OnUnwireEditUIElement(TextBox)

    Called when unwire edit unique identifier element.

    Declaration
    protected override void OnUnwireEditUIElement(TextBox uiElement)
    Parameters
    Type Name Description
    Windows.UI.Xaml.Controls.TextBox uiElement

    The unique identifier element.

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

    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)

    ShouldGridTryToHandleKeyDown(KeyRoutedEventArgs)

    Handles the key interaction with editor of corresponding column.

    Declaration
    protected override bool ShouldGridTryToHandleKeyDown(KeyRoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.Input.KeyRoutedEventArgs e

    The Windows.UI.Xaml.Input.KeyRoutedEventArgs 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<Windows.UI.Xaml.Controls.TextBlock, Windows.UI.Xaml.Controls.TextBox>.ShouldGridTryToHandleKeyDown(Windows.UI.Xaml.Input.KeyRoutedEventArgs)

    Implements

    IGridCellRenderer
    System.IDisposable

    Extension Methods

    DateTimeExtension.ToDateTime(Object)
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved