Class GridCell
Inheritance
System.Object
GridCell
Implements
System.IDisposable
Assembly: Syncfusion.SfGrid.WPF.dll
Syntax
[ClassReference(IsReviewed = false)]
public class GridCell : GridElement, IDisposable
Constructors
GridCell()
Declaration
Fields
CellSelectionBrushProperty
Declaration
public static readonly DependencyProperty CellSelectionBrushProperty
Field Value
Type |
Description |
System.Windows.DependencyProperty |
|
CurrentCellBorderBrushProperty
Dependency registration for CurrnetCell border brush
Declaration
public static readonly DependencyProperty CurrentCellBorderBrushProperty
Field Value
Type |
Description |
System.Windows.DependencyProperty |
|
CurrentCellBorderThicknessProperty
Dependency registration for CurrentCellBorderThickness.
Declaration
public static readonly DependencyProperty CurrentCellBorderThicknessProperty
Field Value
Type |
Description |
System.Windows.DependencyProperty |
|
CurrentCellBorderVisibilityProperty
Dependency registration for CurrentCellBorderVisiblity.
Declaration
public static readonly DependencyProperty CurrentCellBorderVisibilityProperty
Field Value
Type |
Description |
System.Windows.DependencyProperty |
|
ErrorMessageProperty
Declaration
public static readonly DependencyProperty ErrorMessageProperty
Field Value
Type |
Description |
System.Windows.DependencyProperty |
|
SelectionBorderVisibilityProperty
Declaration
public static readonly DependencyProperty SelectionBorderVisibilityProperty
Field Value
Type |
Description |
System.Windows.DependencyProperty |
|
SelectionForegroundBrushProperty
Dependency Registration for SelectionForegroundBrush
Declaration
public static readonly DependencyProperty SelectionForegroundBrushProperty
Field Value
Type |
Description |
System.Windows.DependencyProperty |
|
UseDrawingProperty
Identifies the Syncfusion.UI.Xaml.Grid.GridCell.UseDrawing dependency property.
Declaration
public static readonly DependencyProperty UseDrawingProperty
Field Value
Type |
Description |
System.Windows.DependencyProperty |
|
Properties
CellSelectionBrush
Declaration
public Brush CellSelectionBrush { get; set; }
Property Value
Type |
Description |
System.Windows.Media.Brush |
|
ColumnBase
Gets the ColumnBase details of the GridCell.
Declaration
public DataColumnBase ColumnBase { get; }
Property Value
CurrentCellBorderBrush
Gets or sets Brush for CurrnetCell border.
Declaration
public Brush CurrentCellBorderBrush { get; set; }
Property Value
Type |
Description |
System.Windows.Media.Brush |
|
CurrentCellBorderThickness
Gets or sets a thickness for CurrentCell border
Declaration
public Thickness CurrentCellBorderThickness { get; set; }
Property Value
Type |
Description |
System.Windows.Thickness |
|
CurrentCellBorderVisibility
Get or sets the CurrentCellBorder visibility which is bind to CurrentCell Border visibility property.
Declaration
public Visibility CurrentCellBorderVisibility { get; set; }
Property Value
Type |
Description |
System.Windows.Visibility |
|
ErrorMessage
Gets or sets cell error message which is displayed in cell error indicator's ToolTip.
Declaration
public string ErrorMessage { get; set; }
Property Value
Type |
Description |
System.String |
|
HasError
Gets a value indicating whether GridCell has error or not.
Declaration
public bool HasError { get; }
Property Value
Type |
Description |
System.Boolean |
|
SelectionBorderVisibility
Declaration
public Visibility SelectionBorderVisibility { get; set; }
Property Value
Type |
Description |
System.Windows.Visibility |
|
SelectionForegroundBrush
Gets or sets the value for SelectionForegroundBrush
Declaration
public Brush SelectionForegroundBrush { get; set; }
Property Value
Type |
Description |
System.Windows.Media.Brush |
|
UseDrawing
Gets or sets the value that indicates whether to load light weight template for GridCells to improve loading and scrolling performance.
Declaration
public bool UseDrawing { get; set; }
Property Value
Type |
Description |
System.Boolean |
One of the UseDrawing enumeration that specifies how the grid cells are rendered.
The default value is false./>.
|
Methods
ApplyGridCellVisualStates(String, Boolean)
Declaration
public void ApplyGridCellVisualStates(string cellRegion, bool canApplyDefaultState = true)
Parameters
Type |
Name |
Description |
System.String |
cellRegion |
|
System.Boolean |
canApplyDefaultState |
|
ApplyValidationVisualState(Boolean)
Updates the Visual State of the GridCell based on the cell validation applied on SfDataGrid.
Declaration
protected virtual void ApplyValidationVisualState(bool canApplyDefaultState = true)
Parameters
Type |
Name |
Description |
System.Boolean |
canApplyDefaultState |
|
CanSelectCurrentCell()
Declaration
protected virtual bool CanSelectCurrentCell()
Returns
Type |
Description |
System.Boolean |
|
Dispose()
Disposes all the resources used by the GridCell class.
Declaration
Dispose(Boolean)
Disposes all the resources used by the GridCell class.
Declaration
protected virtual void Dispose(bool isDisposing)
Parameters
Type |
Name |
Description |
System.Boolean |
isDisposing |
Indicates whether the call is from Dispose method or from a finalizer.
|
OnApplyTemplate()
Declaration
public override void OnApplyTemplate()
OnColumnChanged()
Invoked when columns are reused in horizontal scrolling.
Declaration
protected virtual void OnColumnChanged()
OnCreateAutomationPeer()
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
Type |
Description |
System.Windows.Automation.Peers.AutomationPeer |
|
OnDataColumnPropertyChanged(String)
Invoked when ColumnBase properties are changed.
Declaration
protected virtual void OnDataColumnPropertyChanged(string propertyName)
Parameters
Type |
Name |
Description |
System.String |
propertyName |
The name of the property which is changed in ColumnBase.
|
Declaration
protected override void OnMouseDoubleClick(MouseButtonEventArgs e)
Parameters
Type |
Name |
Description |
System.Windows.Input.MouseButtonEventArgs |
e |
|
When click the pop up and select the row, the OnPreviewMouseDown() method is not hit and the row is not selected because the Scrollviewer handled the OnPreviewMouseDown method. So here we written the OnMouseDown() method to overcome this issue.
Declaration
protected override void OnMouseDown(MouseButtonEventArgs e)
Parameters
Type |
Name |
Description |
System.Windows.Input.MouseButtonEventArgs |
e |
|
Method override to set tooltip for GridCell.
Declaration
protected override void OnMouseEnter(MouseEventArgs e)
Parameters
Type |
Name |
Description |
System.Windows.Input.MouseEventArgs |
e |
|
Declaration
protected override void OnMouseMove(MouseEventArgs e)
Parameters
Type |
Name |
Description |
System.Windows.Input.MouseEventArgs |
e |
|
Declaration
protected override void OnMouseUp(MouseButtonEventArgs e)
Parameters
Type |
Name |
Description |
System.Windows.Input.MouseButtonEventArgs |
e |
|
Declaration
protected override void OnPreviewMouseDown(MouseButtonEventArgs e)
Parameters
Type |
Name |
Description |
System.Windows.Input.MouseButtonEventArgs |
e |
|
Declaration
protected override void OnPreviewMouseUp(MouseButtonEventArgs e)
Parameters
Type |
Name |
Description |
System.Windows.Input.MouseButtonEventArgs |
e |
|
Declaration
protected override void OnPreviewMouseWheel(MouseWheelEventArgs e)
Parameters
Type |
Name |
Description |
System.Windows.Input.MouseWheelEventArgs |
e |
|
Declaration
protected virtual bool ShowContextMenu()
Returns
Type |
Description |
System.Boolean |
|
Implements
System.IDisposable