Class ColumnResizingEventArgs
Provides information about the ColumnResizing event.
Inherited Members
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 |
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;
}
}