Class TreeGridCellTextBoxRenderer
Represents a class that maintains the rendering of TreeGridTextColumn.
Inheritance
Inherited Members
Namespace: Syncfusion.UI.Xaml.TreeGrid.Cells
Assembly: Syncfusion.SfGrid.WPF.dll
Syntax
public class TreeGridCellTextBoxRenderer : TreeGridVirtualizingCellRenderer<TextBlock, TextBox>, ITreeGridCellRenderer, IDisposable
Examples
this.sfTreeGrid.CellRenderers.Remove("TextBox");
this.sfTreeGrid.CellRenderers.Add("TextBox", new TreeGridCellTextBoxRendererExt());
public class TreeGridCellTextBoxRendererExt : TreeGridCellTextBoxRenderer
{
public override void OnInitializeEditElement(DataColumnBase dataColumn, TextBox uiElement, object dataContext)
{
uiElement.SelectionShape = SelectionShape.Circle;
uiElement.SelectionHighlightMode = SelectionHighlightMode.Filled;
base.OnInitializeEditElement(dataColumn, uiElement, dataContext);
}
}
Constructors
TreeGridCellTextBoxRenderer()
Declaration
public TreeGridCellTextBoxRenderer()
Methods
EndEdit(TreeDataColumnBase, Object, Boolean)
Ends the edit occuring on the cell.
Declaration
public override bool EndEdit(TreeDataColumnBase dc, object record, bool canResetBinding = false)
Parameters
Type | Name | Description |
---|---|---|
TreeDataColumnBase | dc | The corresponding TreeDataColumnBase. |
System.Object | record | The corresponding record to complete the edit operation. |
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
GetControlValue()
Gets the control value of the cell.
Declaration
public override object GetControlValue()
Returns
Type | Description |
---|---|
System.Object | Returns the control value as |
Overrides
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. |
System.Windows.RoutedEventArgs | e | The System.Windows.RoutedEventArgs instance containing the event data. |
Overrides
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 that contains the corresponding edit UIElement. |
System.Windows.RoutedEventArgs | e | The System.Windows.RoutedEventArgs instance containing the event data. |
Overrides
OnInitializeDisplayElement(TreeDataColumnBase, TextBlock, Object)
Method which initialize the display element of the column.
Declaration
public override void OnInitializeDisplayElement(TreeDataColumnBase dataColumn, TextBlock uiElement, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
TreeDataColumnBase | dataColumn | Specifies the TreeDataColumnBase. |
System.Windows.Controls.TextBlock | uiElement | Specifies the corresponding renderer element. |
System.Object | dataContext | Specifies the data context of the cell. |
Overrides
OnInitializeEditElement(TreeDataColumnBase, TextBox, Object)
Method which is used to initialize the renderer element bindings with corresponding column values.
Declaration
public override void OnInitializeEditElement(TreeDataColumnBase dataColumn, TextBox uiElement, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
TreeDataColumnBase | dataColumn | Specifies the corresponding TreeDataColumnBase. |
System.Windows.Controls.TextBox | uiElement | Specifies the corresponding renderer element. |
System.Object | dataContext | Specifies the data context of the cell. |
Overrides
OnUnwireEditUIElement(TextBox)
Unwires the events associated with edit UIElement.
Declaration
protected override void OnUnwireEditUIElement(TextBox uiElement)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Controls.TextBox | uiElement | The corresponding edit UIElement to unwire its events. |
Overrides
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
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 | True if the parent grid should be allowed to handle keys; False otherwise. |