Class
GridViewCell

Represents a field, as an element of the user interface, of a RadGridView.

Definition

Namespace:Telerik.Windows.Controls.GridView

Assembly:Telerik.Windows.Controls.GridView.dll

Syntax:

cs-api-definition
public class GridViewCell : GridViewCellBase, INotifyPropertyChanged

Inheritance: objectGridViewCellBaseGridViewCell

Implements: INotifyPropertyChanged

Inherited Members GridViewCellBase.CellDoubleClickEventGridViewCellBase.VerticalGridLinesBrushPropertyGridViewCellBase.VerticalGridLinesWidthPropertyGridViewCellBase.OnMouseDoubleClick(MouseButtonEventArgs)GridViewCellBase.OnMouseEnter(MouseEventArgs)GridViewCellBase.OnMouseLeave(MouseEventArgs)GridViewCellBase.OnPropertyChanged(PropertyChangedEventArgs)GridViewCellBase.ColumnGridViewCellBase.ParentRowGridViewCellBase.ParentDataControlGridViewCellBase.DataColumnGridViewCellBase.VerticalGridLinesBrushGridViewCellBase.VerticalGridLinesWidthGridViewCellBase.CellDoubleClickGridViewCellBase.PropertyChanged

Constructors

GridViewCell()

Initializes a new instance of the GridViewCell class.

Declaration

cs-api-definition
public GridViewCell()

Fields

CurrentBorderBrushProperty

Identifies the CurrentBorderBrush dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty CurrentBorderBrushProperty

Field Value

DependencyProperty

DisplayVisualCuesProperty

Identifies the DisplayVisualCues dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty DisplayVisualCuesProperty

Field Value

DependencyProperty

ErrorsProperty

Identifies the Errors dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ErrorsProperty

Field Value

DependencyProperty

HasValidationErrorsProperty

Identifies the HasValidationErrors dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty HasValidationErrorsProperty

Field Value

DependencyProperty

HighlightedBackgroundProperty

Identifies the HighlightedBackground dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty HighlightedBackgroundProperty

Field Value

DependencyProperty

IsCurrentProperty

Identifies the IsCurrent dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsCurrentProperty

Field Value

DependencyProperty

IsHighlightedProperty

Identifies the dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsHighlightedProperty

Field Value

DependencyProperty

IsInEditModeProperty

Identifies the IsInEditMode dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsInEditModeProperty

Field Value

DependencyProperty

IsSelectedProperty

Represents the IsSelected property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsSelectedProperty

Field Value

DependencyProperty

IsValidProperty

Identifies the IsValid dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsValidProperty

Field Value

DependencyProperty

MouseOverBackgroundProperty

Identifies the MouseOverBackground dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty MouseOverBackgroundProperty

Field Value

DependencyProperty

ParentRowValidProperty

Identifies the ParentRowValid dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ParentRowValidProperty

Field Value

DependencyProperty

SelectedBackgroundProperty

Identifies the SelectedBackground dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty SelectedBackgroundProperty

Field Value

DependencyProperty

SelectedEvent

Identifies the Selected routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent SelectedEvent

Field Value

RoutedEvent

UnselectedEvent

Identifies the Unselected routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent UnselectedEvent

Field Value

RoutedEvent

ValueProperty

Identifies the Value dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ValueProperty

Field Value

DependencyProperty

Properties

CurrentBorderBrush

Gets or sets the Brush that is used to paint the current border of the cell.

Declaration

cs-api-definition
public Brush CurrentBorderBrush { get; set; }

Property Value

Brush

DisplayVisualCues

Gets a value indicating whether this instance should display visual cues for selection, validation, etc.

Declaration

cs-api-definition
public bool DisplayVisualCues { get; }

Property Value

bool

Errors

Gets the errors.

Declaration

cs-api-definition
public IEnumerable Errors { get; }

Property Value

IEnumerable

The errors.

HasValidationErrors

Gets or sets a value indicating whether this instance has validation errors.

Declaration

cs-api-definition
public bool HasValidationErrors { get; set; }

Property Value

bool

true if this instance has validation errors; otherwise, false.

HighlightedBackground

Gets or sets the Brush that is used to paint the background of the cell when it is highlighted. This is when performing a search and there is a match.

Declaration

cs-api-definition
public Brush HighlightedBackground { get; set; }

Property Value

Brush

IsCurrent

Gets or sets a value indicating whether this GridViewCell currently has keyboard focus.

Declaration

cs-api-definition
public bool IsCurrent { get; set; }

Property Value

bool

true if this GridViewCell currently has keyboard focus; otherwise, false.

IsInEditMode

Gets or sets a value indicating whether the cell is in edit mode.

Declaration

cs-api-definition
public bool IsInEditMode { get; set; }

Property Value

bool

true if the cell is in edit mode; otherwise, false.

IsSelected

Indicates Whether the cell is selected.

Declaration

cs-api-definition
public bool IsSelected { get; set; }

Property Value

bool

IsValid

Gets a value indicating whether this GridViewCell 's value is correct.

Declaration

cs-api-definition
public bool IsValid { get; }

Property Value

bool

true if this GridViewCell 's value is correct; otherwise, false.

MouseOverBackground

Gets or sets the Brush that is used to paint the background of the cell when it is in MouseOver state.

Declaration

cs-api-definition
public Brush MouseOverBackground { get; set; }

Property Value

Brush

ParentRowValid

Gets a value indicating whether the parent row of this instance is in valid state.

Declaration

cs-api-definition
public bool ParentRowValid { get; }

Property Value

bool

SelectedBackground

Gets or sets the Brush that is used to paint the background of the cell when it is selected.

Declaration

cs-api-definition
public Brush SelectedBackground { get; set; }

Property Value

Brush

Value

Gets or sets the value displayed by the GridViewCellBase.

Declaration

cs-api-definition
public object Value { get; set; }

Property Value

object

The value.

Methods

BeginEdit()

Prepares GridViewCell for edit.

Declaration

cs-api-definition
public void BeginEdit()

CommitEdit()

Attempts to apply the new value of the cell.

Declaration

cs-api-definition
public bool CommitEdit()

Returns

bool

True if the commit is successful (the new value is valid), false otherwise.

GetEditingElement()

Gets the editing element.

Declaration

cs-api-definition
public object GetEditingElement()

Returns

object

OnApplyTemplate()

Declaration

cs-api-definition
public override void OnApplyTemplate()

OnColumnChanged(GridViewColumn, GridViewColumn)

Called due to the cell's column definition changing. Not called due to changes within the current column definition.

Declaration

cs-api-definition
protected override void OnColumnChanged(GridViewColumn oldColumn, GridViewColumn newColumn)

Parameters

oldColumn

GridViewColumn

The old column definition.

newColumn

GridViewColumn

The new column definition.

Overrides GridViewCellBase.OnColumnChanged(GridViewColumn, GridViewColumn)

Remarks

Coerces ContentTemplate and ContentTemplateSelector.

OnCreateAutomationPeer()

Declaration

cs-api-definition
protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer

OnGotFocus(RoutedEventArgs)

Declaration

cs-api-definition
protected override void OnGotFocus(RoutedEventArgs e)

Parameters

e

RoutedEventArgs

OnInitialized(EventArgs)

Declaration

cs-api-definition
protected override void OnInitialized(EventArgs e)

Parameters

e

EventArgs

OnLostFocus(RoutedEventArgs)

Declaration

cs-api-definition
protected override void OnLostFocus(RoutedEventArgs e)

Parameters

e

RoutedEventArgs

OnMouseLeftButtonDown(MouseButtonEventArgs)

Declaration

cs-api-definition
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)

Parameters

e

MouseButtonEventArgs

OnMouseLeftButtonUp(MouseButtonEventArgs)

Declaration

cs-api-definition
protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)

Parameters

e

MouseButtonEventArgs

OnPropertyChanged(DependencyPropertyChangedEventArgs)

Declaration

cs-api-definition
protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)

Parameters

e

DependencyPropertyChangedEventArgs

OnSelected(RadRoutedEventArgs)

Raises the Selected event.

Declaration

cs-api-definition
protected virtual void OnSelected(RadRoutedEventArgs e)

Parameters

e

RadRoutedEventArgs

Empty event arguments.

OnTextInput(TextCompositionEventArgs)

Declaration

cs-api-definition
protected override void OnTextInput(TextCompositionEventArgs e)

Parameters

e

TextCompositionEventArgs

OnUnselected(RadRoutedEventArgs)

Raises the Unselected event.

Declaration

cs-api-definition
protected virtual void OnUnselected(RadRoutedEventArgs e)

Parameters

e

RadRoutedEventArgs

Empty event arguments.

PrepareCellProperties()

Declaration

cs-api-definition
protected virtual void PrepareCellProperties()

Events

Selected

Occurs when GridViewCell becomes selected.

Declaration

cs-api-definition
public event RoutedEventHandler Selected

Event Value

RoutedEventHandler

Unselected

Occurs when GridViewCell becomes unselected.

Declaration

cs-api-definition
public event RoutedEventHandler Unselected

Event Value

RoutedEventHandler