New to Telerik UI for WinFormsStart a free 30-day trial

Represents a data cell in RadGridView that contains information about a specific cell's data, formatting, and state within the grid structure.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.GridView.dll

Syntax:

C#
public class GridViewCellInfo : IEquatable<GridViewCellInfo>

Inheritance: objectGridViewCellInfo

Derived Classes: GridViewHyperlinkCellInfo

Implements: IEquatable<GridViewCellInfo>

Constructors

Initializes a new instance of the GridViewCellInfo class.

C#
public GridViewCellInfo(GridViewRowInfo row, GridViewColumn column, GridViewCellInfoCollection owner)
Parameters:rowGridViewRowInfo

The row that this cell belongs to.

columnGridViewColumn

The column that this cell belongs to.

ownerGridViewCellInfoCollection

The collection that owns this cell information.

Properties

Gets the column information associated with this cell.

C#
public GridViewColumn ColumnInfo { get; }
Property Value:

The GridViewColumn that this cell belongs to.

Gets or sets the error text that should be displayed when the cell data is not correct.

C#
public string ErrorText { get; set; }
Property Value:

The error text associated with this cell, or an empty string if there are no errors.

Gets a value indicating whether this cell has custom style information applied.

C#
public bool HasStyle { get; }
Property Value:

true if this cell has custom style information; otherwise, false.

Gets a value indicating whether this cell is the current cell in the grid.

C#
public bool IsCurrent { get; }
Property Value:

true if this cell is the current cell; otherwise, false.

Gets or sets a value indicating whether this cell is selected.

C#
public bool IsSelected { get; set; }
Property Value:

true if this cell is selected; otherwise, false.

Gets or sets a value indicating whether this cell is read-only.

C#
public bool ReadOnly { get; set; }
Property Value:

true if this cell is read-only and cannot be edited; otherwise, false.

Gets the row information associated with this cell.

C#
public GridViewRowInfo RowInfo { get; }
Property Value:

The GridViewRowInfo that this cell belongs to.

Gets the style information for this cell.

C#
public GridViewCellStyle Style { get; }
Property Value:

The GridViewCellStyle that defines the visual appearance of this cell.

Gets or sets a tag object that can be used to store user data corresponding to this cell.

C#
public object Tag { get; set; }
Property Value:

An object that contains user-defined data associated with this cell.

Gets or sets the value contained in this cell.

C#
public object Value { get; set; }
Property Value:

The value stored in this cell.

Gets the view information where this cell appears.

C#
public GridViewInfo ViewInfo { get; }
Property Value:

The GridViewInfo that contains this cell.

Gets the view template that this cell belongs to.

C#
public GridViewTemplate ViewTemplate { get; }
Property Value:

The GridViewTemplate that contains this cell.

Methods

Puts this cell into edit mode, allowing the user to modify its value.

C#
public void BeginEdit()

Commits any changes made to this cell and exits edit mode.

C#
public void EndEdit()

Ensures that this cell is visible in the grid view by scrolling to it if necessary.

C#
public void EnsureVisible()

Determines whether the specified GridViewCellInfo is equal to the current cell.

C#
public bool Equals(GridViewCellInfo cellInfo)
Parameters:cellInfoGridViewCellInfo

The cell information to compare with the current cell.

Returns:

bool

true if the specified cell is equal to the current cell; otherwise, false.

Implements: IEquatable<GridViewCellInfo>.Equals(GridViewCellInfo)

Determines whether the specified object is equal to the current GridViewCellInfo.

C#
public override bool Equals(object obj)
Parameters:objobject

The object to compare with the current cell information.

Returns:

bool

true if the specified object is equal to the current cell information; otherwise, false.

Overrides: object.Equals(object)

Serves as the default hash function for this GridViewCellInfo.

C#
public override int GetHashCode()
Returns:

int

A hash code for the current GridViewCellInfo.

Overrides: object.GetHashCode()