menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class TaskbarEditingEventArgs<TValue> - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class TaskbarEditingEventArgs<TValue>

    Provides information about the TaskbarEditing event.

    Inheritance
    System.Object
    TaskbarEditingEventArgs<TValue>
    Namespace: Syncfusion.Blazor.Gantt
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class TaskbarEditingEventArgs<TValue> : Object
    Type Parameters
    Name Description
    TValue

    TValue of the SfGantt<TValue>component.

    Constructors

    TaskbarEditingEventArgs()

    Declaration
    public TaskbarEditingEventArgs()

    Properties

    Action

    Gets the taskbar editing action. The available taskbar editing actions are:

    • ParentDrag
    • ChildDrag
    • RightResizing
    • LeftResizing
    • ProgressResizing
    Declaration
    public string Action { get; }
    Property Value
    Type Description
    System.String

    Accepts a string value that represents the taskbar editing action.

    Remarks

    The Action property represents the taskbar editing action performed in the GanttChart component. It can have different values depending on the type of taskbar manipulation being performed. The available taskbar editing actions are:

    • ParentDrag: Indicates that the taskbar is being dragged as a parent task.
    • ChildDrag: Indicates that the taskbar is being dragged as a child task.
    • RightResizing: Indicates that the right side of the taskbar is being resized.
    • LeftResizing: Indicates that the left side of the taskbar is being resized.
    • ProgressResizing: Indicates that the progress portion of the taskbar is being resized. You can use the Action property to determine the type of taskbar editing action that is being performed and respond accordingly in your code.

    Cancel

    Cancels the taskbar edit action.

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

    true, if the taskbar edit action can be canceled. Otherwise, false.

    Data

    Gets the data of the task being edited.

    Declaration
    public TValue Data { get; }
    Property Value
    Type Description
    TValue

    The data object representing the task being edited.

    Remarks

    The Data property represents the data of the task currently being edited in the GanttChart component. It provides access to the data object that represents the task and contains various properties such as task name, start date, end date, duration, and other task-related information. You can use the Data property to retrieve or modify the data of the task being edited and perform any necessary operations or validations on it.

    EnablePredecessorOffsetValidation

    Determines whether to restrict taskbar dragging beyond a predecessor value.

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

    true if taskbar dragging should be restricted to a date less than the predecessor value; otherwise, false.
    The default value is false.

    Remarks

    When EnablePredecessorOffsetValidation is set to true, the gantt chart component will enforce a rule that prevents taskbars from being dragged to a date later than the date of their predecessors.
    If the taskbar is dragged above the given predecessor offset value, it gets reverted to the minimum predecessor value.

    Examples
     
    
    @using Syncfusion.Blazor.Gantt 
    <SfGantt DataSource="@TaskCollection"> 
        <GanttEvents TaskbarEditing="TaskbarEditing" TValue="TaskData"></GanttEvents> 
    </SfGantt> 
    @code{ 
        public void TaskbarEditing(TaskbarEditingEventArgs<TaskData> args) 
        { 
             args.EnablePredecessorOffsetValidation = true;  
        } 
    } 

    EnablePredecessorValidation

    Determines whether the task’s date values are validated and updated automatically based on predecessor values.

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

    true if validation of task date values based on predecessors is enabled; otherwise, false.
    The default value is true.

    Remarks

    The EnablePredecessorValidation property controls whether Gantt task dates are validated based on their predecessor tasks. /// When set to true, task date values will be validated based on DependencyType.
    When set to false, this validation is disabled.
    By default, EnablePredecessorValidation is set to true, indicating that validation is enabled.

    Examples
     
    
    @using Syncfusion.Blazor.Gantt 
    <SfGantt DataSource="@TaskCollection"> 
        <GanttEvents TaskbarEditing="TaskbarEditing" TValue="TaskData"></GanttEvents> 
    </SfGantt> 
    @code{ 
        public void TaskbarEditing(TaskbarEditingEventArgs<TaskData> args) 
        { 
             args.EnablePredecessorValidation = false;  
        } 
    } 

    ValidationMode

    Gets or sets the data validation mode for predecessor relationships in the SfGantt<TValue>component.

    Declaration
    public ValidateMode ValidationMode { get; set; }
    Property Value
    Type Description
    ValidateMode

    One of the ValidationMode enumeration that specifies the validation mode for predecessor relationships.

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