menu

WinForms

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

    Show / Hide Table of Contents

    Class Columns

    Represents a class that contains the collection of GridColumn.

    Inheritance
    System.Object
    Columns
    Implements
    System.IDisposable
    Namespace: Syncfusion.WinForms.DataGrid
    Assembly: Syncfusion.SfDataGrid.WinForms.dll
    Syntax
    public class Columns : ObservableCollection<GridColumn>, IDisposable

    Constructors

    Columns()

    Initializes a new instance of the Columns class.

    Declaration
    public Columns()

    Properties

    Item[String]

    Gets the GridColumn for the given mapping name.

    Declaration
    public GridColumn this[string mappingName] { get; }
    Parameters
    Type Name Description
    System.String mappingName

    The mapping name of the column.

    Property Value
    Type Description
    GridColumn

    Returns the GridColumn.

    Methods

    Dispose()

    Disposes the columns collection.

    Declaration
    public void Dispose()

    Dispose(Boolean)

    Disposes all the resources used by the Columns class.

    Declaration
    protected virtual void Dispose(bool isDisposing)
    Parameters
    Type Name Description
    System.Boolean isDisposing

    Indicates the call is from Dispose method.

    InsertItem(Int32, GridColumn)

    Inserts a GridColumn into the collection at the specified index.

    Declaration
    protected override void InsertItem(int index, GridColumn item)
    Parameters
    Type Name Description
    System.Int32 index

    The zero-based index at which the item should be inserted.

    GridColumn item

    The GridColumn to insert into the collection.

    OnCollectionChanged(NotifyCollectionChangedEventArgs)

    Occurs when the collection is changed.

    Declaration
    protected override void OnCollectionChanged(NotifyCollectionChangedEventArgs e)
    Parameters
    Type Name Description
    System.Collections.Specialized.NotifyCollectionChangedEventArgs e

    The System.Collections.Specialized.NotifyCollectionChangedEventArgs that contains the event data.

    ToString()

    Overridden to update the display text in the property grid.

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

    Returns the string that represent a current object.

    Implements

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