menu

WinForms

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

    Show / Hide Table of Contents

    Class GridModel

    Represents a wrapper class for SfDataGrid control to handle the collection and view related operations.

    Inheritance
    System.Object
    GridModel
    Inherited Members
    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.WinForms.DataGrid
    Assembly: Syncfusion.SfDataGrid.WinForms.dll
    Syntax
    public class GridModel
    Remarks

    GridModel class listens to the collection changes in a SFDataGrid control and responds to them. It updates the System.Windows.Forms.View in response to the collection changes.

    Constructors

    GridModel(SfDataGrid, GroupPanel)

    Initializes a new instance of the GridModel class.

    Declaration
    public GridModel(SfDataGrid dataGrid, GroupPanel groupPanel)
    Parameters
    Type Name Description
    SfDataGrid dataGrid

    The SfDataGrid.

    GroupPanel groupPanel

    The GroupPanel of the grid.

    Properties

    IsInSort

    Gets a value indicating whether the sorting is in process.

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

    Methods

    FilterColumn(GridColumn, List<FilterPredicate>)

    Applies the given filter predicates collection to the appropriate column.

    Declaration
    public void FilterColumn(GridColumn column, List<FilterPredicate> filterPredicates)
    Parameters
    Type Name Description
    GridColumn column

    The column that needs to be applied with the filter predicates.

    System.Collections.Generic.List<FilterPredicate> filterPredicates

    The filter predicates collection that needs to apply for the column.

    InvalidateDataGrid()

    Invalidates entire grid.

    Declaration
    public void InvalidateDataGrid()

    InvalidateRow(Int32)

    Invalidating the rectangle that represents the row,as determined by the row index.

    Declaration
    public void InvalidateRow(int rowIndex)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The row index of the desired record.

    RefreshView(Boolean)

    Refreshes the view.

    Declaration
    public void RefreshView(bool needToUpdateRowCount = true)
    Parameters
    Type Name Description
    System.Boolean needToUpdateRowCount

    Indicates whether the row count is updated while updating view.

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved