menu

Blazor

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

    Show / Hide Table of Contents

    Class ColumnResizingEventArgs

    Provides information about the ColumnResizing event.

    Inheritance
    System.Object
    ColumnResizedEventArgs
    ColumnResizingEventArgs
    Inherited Members
    ColumnResizedEventArgs.ColumnIndex
    ColumnResizedEventArgs.ColumnName
    ColumnResizedEventArgs.ColumnWidth
    Namespace: Syncfusion.Blazor.Spreadsheet
    Assembly: Syncfusion.Blazor.Spreadsheet.dll
    Syntax
    public class ColumnResizingEventArgs : ColumnResizedEventArgs
    Remarks

    This event handler receives a ColumnResizingEventArgs object which provides the details of the resizing column.

    You can prevent the resize action using the Cancel property by setting it to true.

    This event is triggered before the column resize operation is completed, allowing you to intercept and potentially cancel the operation.

    Constructors

    ColumnResizingEventArgs()

    Declaration
    public ColumnResizingEventArgs()

    Properties

    Cancel

    Gets or sets a value indicating whether to cancel the resize action.

    Declaration
    public bool Cancel { get; set; }
    Property Value
    Type Description
    System.Boolean

    A System.Boolean indicating whether the resize action should be cancelled. The default value is false. If the Cancel property is set to true, then the resize action will be cancelled.

    Examples
    // Event handler that cancels column resizing for specific columns
    private void OnColumnResizing(ColumnResizingEventArgs args)
    {
        // Cancel resizing for the first column
        if (args.ColumnIndex == 0)
        {
            args.Cancel = true;
        }
    
        // You can also conditionally cancel based on other criteria
        if (args.ColumnWidth < 50)
        {
            args.Cancel = true;
        }
    }
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved