menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GridModelHideRowColsIndexer - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class GridModelHideRowColsIndexer

    Implements the functionalities that manages row heights and column widths in a grid and lets you change them. Events will be raised in the grid when settings are changed.

    Inheritance
    System.Object
    NonFinalizeDisposable
    GridModelBound
    GridModelHideRowColsIndexer
    Implements
    System.IDisposable
    System.Runtime.Serialization.ISerializable
    Inherited Members
    GridModelBound.Dispose(Boolean)
    GridModelBound.Model
    GridModelBound.OnModelDeserialization(Object, GridModel)
    GridModelBound.SetModelInt(GridModel)
    NonFinalizeDisposable.Dispose()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.Windows.Forms.Grid
    Assembly: Syncfusion.Grid.Windows.dll
    Syntax
    public abstract class GridModelHideRowColsIndexer : GridModelBound, IDisposable, ISerializable
    Remarks

    You typically access this class from a grid using the HideRows and HideCols properties of a GridModel.

    This class raises the following events in a GridModel:

    Items-Descriptions

    • RowsHidden
    • RowsHiding
    • ColsHidden
    • ColsHiding
    • Syncfusion.Windows.Forms.Grid.GridModel.QueryHideCol
    • Syncfusion.Windows.Forms.Grid.GridModel.QueryHideRow
    • Syncfusion.Windows.Forms.Grid.GridModel.SaveHideCol
    • Syncfusion.Windows.Forms.Grid.GridModel.SaveHideRow

    Constructors

    GridModelHideRowColsIndexer(GridModel)

    Initializes a instance of GridModelHideRowColsIndexer and associates it with a GridModel.

    Declaration
    protected GridModelHideRowColsIndexer(GridModel model)
    Parameters
    Type Name Description
    GridModel model

    A reference to the parent GridModel.

    GridModelHideRowColsIndexer(SerializationInfo, StreamingContext)

    Initializes a new instances of GridModelHideRowColsIndexer from a serialization stream.

    Declaration
    protected GridModelHideRowColsIndexer(SerializationInfo info, StreamingContext context)
    Parameters
    Type Name Description
    System.Runtime.Serialization.SerializationInfo info

    An object that holds all the data needed to serialize or de-serialize this instance.

    System.Runtime.Serialization.StreamingContext context

    Describes the source and destination of the serialized stream specified by info.

    Properties

    Dictionary

    Gets storage for all hidden row and column settings in the grid.

    Declaration
    public IGridRowColHideDictionary Dictionary { get; }
    Property Value
    Type
    IGridRowColHideDictionary
    Remarks

    You can replace this dictionary at run-time with a custom dictionary if you implement the IGridRowColSizeDictionary interface.

    Item[Int32]

    Gets or sets the hidden row or column state for the specified index.

    Declaration
    public bool this[int index] { get; set; }
    Parameters
    Type Name Description
    System.Int32 index
    Property Value
    Type
    System.Boolean
    Remarks

    Call ResetRange reset values to default.

    Item[String]

    Gets or sets the hidden row or column state for the row or column that matches the specified name.

    Declaration
    public abstract bool this[string name] { get; set; }
    Parameters
    Type Name Description
    System.String name
    Property Value
    Type
    System.Boolean
    Remarks

    Call ResetRange reset values to default. Call IsDefault to check if a value is reset to default. Call IsHidden[n] to check if a row or column is hidden.

    Modified

    Gets a value indicating whether the dictionary was modified.

    Declaration
    public bool Modified { get; }
    Property Value
    Type
    System.Boolean

    RowColName

    Gets "HideRow" or "HideColumn" string.

    Declaration
    public abstract string RowColName { get; }
    Property Value
    Type
    System.String

    RowColObject

    Gets a reference to Rows or Cols.

    Declaration
    public abstract GridModelRowColOperations RowColObject { get; }
    Property Value
    Type
    GridModelRowColOperations

    Methods

    GetHidden(Int32)

    Determines the hidden rows and columns.

    Declaration
    protected virtual bool GetHidden(int index)
    Parameters
    Type Name Description
    System.Int32 index

    The index.

    Returns
    Type Description
    System.Boolean

    returns boolean value

    GetObjectData(SerializationInfo, StreamingContext)

    Implements the ISerializable interface and returns the data needed to serialize the GridModelHideRowColsIndexer.

    Declaration
    public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
    Parameters
    Type Name Description
    System.Runtime.Serialization.SerializationInfo info

    A SerializationInfo object containing the information required to serialize the object.

    System.Runtime.Serialization.StreamingContext context

    A StreamingContext object containing the source and destination of the serialized stream.

    GetRange(Int32, Int32)

    Gets an array of System.Boolean. The array will have true values for rows and columns that are hidden. Rows and columns that are displayed will have a false value.

    Declaration
    public bool[] GetRange(int from, int last)
    Parameters
    Type Name Description
    System.Int32 from

    First row or column.

    System.Int32 last

    Last row or column.

    Returns
    Type Description
    System.Boolean[]

    An array with row and column hidden settings.

    OnChanged(GridRowColHiddenEventArgs)

    Used internally.

    Declaration
    public abstract void OnChanged(GridRowColHiddenEventArgs e)
    Parameters
    Type Name Description
    GridRowColHiddenEventArgs e

    OnChanging(GridRowColHidingEventArgs)

    Used internally.

    Declaration
    public abstract bool OnChanging(GridRowColHidingEventArgs e)
    Parameters
    Type Name Description
    GridRowColHidingEventArgs e

    The GridRowColHidingEventArgs instance containing the event data.

    Returns
    Type Description
    System.Boolean

    returns boolean value.

    OnQueryHide(GridRowColHideEventArgs)

    Used internally.

    Declaration
    protected abstract void OnQueryHide(GridRowColHideEventArgs e)
    Parameters
    Type Name Description
    GridRowColHideEventArgs e

    OnSaveHide(GridRowColHideEventArgs)

    Used internally.

    Declaration
    protected abstract void OnSaveHide(GridRowColHideEventArgs e)
    Parameters
    Type Name Description
    GridRowColHideEventArgs e

    ResetRange(Int32, Int32)

    Resets the range of rows or columns to be displayed.

    Declaration
    public void ResetRange(int from, int last)
    Parameters
    Type Name Description
    System.Int32 from

    First row or column index in range.

    System.Int32 last

    Last row or column index in range.

    SetHidden(Int32, Boolean)

    Sets the hidden row and columns. Used internally.

    Declaration
    protected virtual void SetHidden(int index, bool value)
    Parameters
    Type Name Description
    System.Int32 index
    System.Boolean value

    SetRange(Int32, Int32, Boolean)

    Changes the hidden state for a range of rows or columns.

    Declaration
    public void SetRange(int from, int last, bool value)
    Parameters
    Type Name Description
    System.Int32 from

    First row or column index in range.

    System.Int32 last

    Last row or column index in range.

    System.Boolean value

    The hidden state to be applied.

    Remarks

    The method will generate undo information and push it onto the grid's command stack.

    A RowsHiding or ColsHiding) event is raised before the values are modified and gives event listeners a chance to discard the operation before any change happens.

    If the RowsHiding event did not signal to cancel any changes, the operation will go ahead, apply changes, and raise a RowsHidden event. The RowsHidden will indicate if changes were successful or not.

    SetRange(Int32, Int32, Boolean[])

    Changes the hidden state for a range of rows or columns.

    Declaration
    public void SetRange(int from, int last, bool[] values)
    Parameters
    Type Name Description
    System.Int32 from

    First row or column index in range.

    System.Int32 last

    Last row or column index in range.

    System.Boolean[] values

    An array with hidden states to be applied.

    SetRange(Int32, Int32, Boolean[], Boolean)

    Changes the hidden state for a range of rows or columns.

    Declaration
    public void SetRange(int from, int last, bool[] values, bool discardUndo)
    Parameters
    Type Name Description
    System.Int32 from

    First row or column index in range.

    System.Int32 last

    Last row or column index in range.

    System.Boolean[] values

    An array with hidden states to be applied.

    System.Boolean discardUndo

    True if no undo information should be generated.

    Implements

    System.IDisposable
    System.Runtime.Serialization.ISerializable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved