WinForms

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GridCellContextValue - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class GridCellContextValue

    Provides storage for a value that can only be associated with one specific cell. Optimal for shared cell objects where only one cell will create events at a time. Other cells will have a default value instead.

    Inheritance
    System.Object
    GridCellContextValue
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.Windows.Forms.Grid
    Assembly: Syncfusion.Grid.Windows.dll
    Syntax
    public class GridCellContextValue
    Remarks

    GridCellButton does for example use this storage to save and query for hovering and mouse down state. Only one cell can be in hovering or mouse down mode.

    Constructors

    GridCellContextValue(Int32, Int32, Object, Object)

    Initializes GridCellContextValue with row, column index, and associated value and a default value.

    Declaration
    public GridCellContextValue(int rowIndex, int colIndex, object value, object defaultValue)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The row index.

    System.Int32 colIndex

    The column index.

    System.Object value

    The value that is specific to row and column index.

    System.Object defaultValue

    The default value to be used for all queries where the row and column index do not match the current settings.

    GridCellContextValue(Object)

    Initializes the new instances of theGridCellContextValue class with a default value.

    Declaration
    public GridCellContextValue(object defaultValue)
    Parameters
    Type Name Description
    System.Object defaultValue

    The default value to be used for all queries where the row and column index do not match the current settings.

    Properties

    Info

    Gets results of ToString method.

    Declaration
    public string Info { get; }
    Property Value
    Type Description
    System.String

    Methods

    GetValue(Int32, Int32)

    Gets the value for the specific row and column index.

    Declaration
    public object GetValue(int rowIndex, int colIndex)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The row index.

    System.Int32 colIndex

    The column index.

    Returns
    Type Description
    System.Object

    If the row and column index do match the current settings, the saved value is returned; otherwise the default value is returned.

    ResetValue()

    Resets current information. The value will be reset to default value.

    Declaration
    public void ResetValue()

    SetValue(Int32, Int32, Object)

    Sets the value for the specific row and column index.

    Declaration
    public bool SetValue(int rowIndex, int colIndex, object value)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The row index.

    System.Int32 colIndex

    The column index.

    System.Object value

    The value that is specific to row and column index.

    Returns
    Type Description
    System.Boolean

    True if the value was modified; False otherwise.

    ToString()

    Returns a System.String that represents the current System.Object.

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String

    A System.String that represents the current System.Object.

    Overrides
    System.Object.ToString()
    Back to top Generated by DocFX
    Copyright © 2001 - 2022 Syncfusion Inc. All Rights Reserved