WinForms

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

    Show / Hide Table of Contents

    Class GridButtonColumn

    Represents a column that used to display the button as the edit element.

    Inheritance
    System.Object
    SfGridColumnBase<TableControl>
    GridColumnBase
    GridColumn
    GridButtonColumn
    Implements
    System.IDisposable
    IFilterDefinition
    Inherited Members
    GridColumn.ToString()
    GridColumn.SetCellType(String)
    GridColumn.CellType
    GridColumn.Renderer
    GridColumn.TableControl
    GridColumnBase.GetFormattedValue(Object, Object)
    GridColumnBase.Dispose(Boolean)
    GridColumnBase.AllowTextWrapping
    GridColumnBase.TextTrimming
    GridColumnBase.AllowHeaderTextWrapping
    GridColumnBase.ShowToolTip
    GridColumnBase.ShowHeaderToolTip
    GridColumnBase.AllowGrouping
    GridColumnBase.AllowDragging
    GridColumnBase.CellStyle
    GridColumnBase.AllowFiltering
    GridColumnBase.AllowResizing
    GridColumnBase.Visible
    GridColumnBase.AllowFocus
    GridColumnBase.HeaderStyle
    GridColumnBase.Width
    GridColumnBase.HeaderText
    GridColumnBase.AllowSorting
    GridColumnBase.IsAutoGenerated
    GridColumnBase.MappingName
    GridColumnBase.AutoSizeColumnsMode
    GridColumnBase.ActualWidth
    GridColumnBase.MinimumWidth
    GridColumnBase.MaximumWidth
    GridColumnBase.FilterMode
    GridColumnBase.ColumnMemberType
    GridColumnBase.FilterBehavior
    GridColumnBase.FilteredFrom
    GridColumnBase.ImmediateUpdateColumnFilter
    GridColumnBase.AllowBlankFilters
    GridColumnBase.FilterPopupMode
    GridColumnBase.AdvancedFilterType
    GridColumnBase.FilterPredicates
    GridColumnBase.Format
    GridColumnBase.FormatProvider
    GridColumnBase.NullDisplayText
    GridColumnBase.GroupMode
    GridColumnBase.SortMode
    GridColumnBase.AllowEditing
    GridColumnBase.ValidationMode
    GridColumnBase.FilterRowEditorType
    GridColumnBase.FilterRowCondition
    GridColumnBase.ShowFilterRowOptions
    GridColumnBase.FilterRowText
    GridColumnBase.EnableCaseSensitiveFilterRow
    GridColumnBase.EnableCaseSensitiveFiterRow
    GridColumnBase.HeaderImage
    GridColumnBase.AllowHeaderTextWithImage
    GridColumnBase.HeaderTextImageRelation
    SfGridColumnBase<TableControl>.Dispose()
    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.WinForms.DataGrid
    Assembly: Syncfusion.SfDataGrid.WinForms.dll
    Syntax
    public class GridButtonColumn : GridColumn, IDisposable, IFilterDefinition
    Examples
    //To add the button column with default button text.
    sfDataGrid1.Columns.Add(new GridButtonColumn() { MappingName = "Action", ShowDefaultButtonText = false, DefaultButtonText = "Click"});
    
    List<CellButton> buttons = new List<CellButton>();
    buttons.Add(new CellButton() { Text = "OK" });
    buttons.Add(new CellButton() { Text = "Cancel", Image = SystemIcons.Hand.ToBitmap(), Size = new Size(60, 28) });
    buttons.Add(new CellButton() { Text = "AddNew", Style = new ButtonCellStyleInfo() { Padding = new Padding(4) } });
    
    //To add the button column with multiple buttons
    sfDataGrid1.Columns.Add(new GridButtonColumn() { MappingName = "Status" , Buttons = buttons, Orientation = Orientation.Vertical});

    Constructors

    GridButtonColumn()

    Initializes a new instance of the GridButtonColumn class.

    Declaration
    public GridButtonColumn()

    Properties

    AllowDefaultButtonText

    Gets or sets a value indicating whether the button needs to display the default value or not.

    Declaration
    [Cloneable(true)]
    public bool AllowDefaultButtonText { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    If it’s set to true, It will display the DefaultButtonText of the column, otherwise display only the cell value as the button text.

    Buttons

    Gets or sets the list of buttons that needs to be renderer in the Grid Cell.

    Declaration
    [Cloneable(true)]
    public List<CellButton> Buttons { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.List<CellButton>

    ButtonSize

    Gets or sets the default size of the button.

    Declaration
    [Cloneable(true)]
    public Size ButtonSize { get; set; }
    Property Value
    Type Description
    System.Drawing.Size

    DefaultButtonText

    Gets or sets the default button text of the column.

    Declaration
    [Cloneable(true)]
    public string DefaultButtonText { get; set; }
    Property Value
    Type Description
    System.String

    Image

    Gets or sets the image for the GridButtonColumn.

    Declaration
    [Cloneable(true)]
    public Image Image { get; set; }
    Property Value
    Type Description
    System.Drawing.Image

    ImageIndex

    Gets or sets the index of the image in a image list to display on the button.

    Declaration
    [Cloneable(true)]
    public int ImageIndex { get; set; }
    Property Value
    Type Description
    System.Int32

    ImageList

    Gets or sets the image list that used to display the image on the button.

    Declaration
    [Cloneable(true)]
    public ImageList ImageList { get; set; }
    Property Value
    Type Description
    System.Windows.Forms.ImageList

    ImageSize

    Gets or sets the size of the image in a button.

    Declaration
    [Cloneable(true)]
    public Size ImageSize { get; set; }
    Property Value
    Type Description
    System.Drawing.Size

    Orientation

    Gets or sets the orientation of rendering the multiple buttons on the button column.

    Declaration
    [Cloneable(true)]
    public Orientation Orientation { get; set; }
    Property Value
    Type Description
    System.Windows.Forms.Orientation

    TextImageRelation

    Gets or sets the position of the text and image relative to each other.

    Declaration
    [Cloneable(true)]
    public TextImageRelation TextImageRelation { get; set; }
    Property Value
    Type Description
    System.Windows.Forms.TextImageRelation

    Implements

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