Class TreeGridCellComboBoxRenderer
Represents the class that loads the
Inheritance
Inherited Members
Namespace: Syncfusion.UI.Xaml.TreeGrid.Cells
Assembly: Syncfusion.SfGrid.UWP.dll
Syntax
public class TreeGridCellComboBoxRenderer : TreeGridVirtualizingCellRenderer<ContentControl, ComboBox>, ITreeGridCellRenderer, IDisposable
Examples
this.sfTreeGrid.CellRenderers.Remove("ComboBox");
this.sfTreeGrid.CellRenderers.Add("ComboBox", new TreeGridCellComboBoxRendererExt());
public class TreeGridCellComboBoxRendererExt : TreeGridCellComboBoxRenderer
{
public override void OnInitializeDisplayElement(TreeDataColumnBase dataColumn, ContentControl uiElement, object dataContext)
{
base.OnInitializeDisplayElement(dataColumn, uiElement, dataContext);
uiElement.Foreground = new SolidColorBrush(Colors.DarkOrange);
}
}
Constructors
TreeGridCellComboBoxRenderer()
Initializes a new instance of TreeGridCellComboBoxRenderer class.
Declaration
public TreeGridCellComboBoxRenderer()
Fields
lastKeyPressed
Declaration
public Nullable<VirtualKey> lastKeyPressed
Field Value
Type |
---|
System.Nullable<Windows.System.VirtualKey> |
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 | Specifies the TreeDataColumnBase. |
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
GetControlValue()
Gets the control value of the cell.
Declaration
public override object GetControlValue()
Returns
Type | Description |
---|---|
System.Object | Returns the control value as |
Overrides
OnCreateDisplayUIElement()
Creates a new UIElement for the display mode of cell.
Declaration
protected override ContentControl OnCreateDisplayUIElement()
Returns
Type | Description |
---|---|
Windows.UI.Xaml.Controls.ContentControl | The new UIElement for the display mode of cell. |
Overrides
OnCreateEditUIElement()
Creates a new UIElement for the edit mode of cell.
Declaration
protected override ComboBox OnCreateEditUIElement()
Returns
Type | Description |
---|---|
Windows.UI.Xaml.Controls.ComboBox | Returns the new UIElement for edit mode of cell. |
Overrides
OnEditElementLoaded(Object, RoutedEventArgs)
Invoked when the edit element(ComboBox) 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 that contains the corresponding edit UIElement. |
Windows.UI.Xaml.RoutedEventArgs | e | The Windows.UI.Xaml.RoutedEventArgs instance containing the event data. |
Overrides
OnEnteredEditMode(TreeDataColumnBase, FrameworkElement)
Invoked when the cell is being entered the edit mode.
Declaration
protected override void OnEnteredEditMode(TreeDataColumnBase dataColumn, FrameworkElement currentRendererElement)
Parameters
Type | Name | Description |
---|---|---|
TreeDataColumnBase | dataColumn | The corresponding data column. |
Windows.UI.Xaml.FrameworkElement | currentRendererElement | The current renderer element. |
Overrides
OnInitializeDisplayElement(TreeDataColumnBase, ContentControl, Object)
Method which initialize the display element of the column.
Declaration
public override void OnInitializeDisplayElement(TreeDataColumnBase dataColumn, ContentControl uiElement, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
TreeDataColumnBase | dataColumn | Specifies the TreeDataColumnBase. |
Windows.UI.Xaml.Controls.ContentControl | uiElement | Specifies the corresponding renderer element. |
System.Object | dataContext | Specifies the data context. |
Overrides
OnInitializeEditElement(TreeDataColumnBase, ComboBox, Object)
Invoked when the edit element is initialized on the cell.
Declaration
public override void OnInitializeEditElement(TreeDataColumnBase dataColumn, ComboBox uiElement, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
TreeDataColumnBase | dataColumn | Specified the TreeDataColumnBase. |
Windows.UI.Xaml.Controls.ComboBox | uiElement | Specifies the corresponding renderer element. |
System.Object | dataContext | Specifies the data context of the cell. |
Overrides
OnUnwireEditUIElement(ComboBox)
Unwires the events associated with edit UIElement
Declaration
protected override void OnUnwireEditUIElement(ComboBox uiElement)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.Controls.ComboBox | 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(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. |