Making the editor read only

0 Answers 65 Views
Gantt
Patrick
Top achievements
Rank 1
Patrick asked on 15 Nov 2023, 07:23 PM

We are trying to make certain field (title) read-only in the Gantt task editor. Below is the sample code

  private createFormGroup(dataItem: GanttTask): FormGroup {
    return new FormGroup({
      id: new FormControl(dataItem.id),
      start: new FormControl(dataItem.start),
      end: new FormControl(dataItem.end),
      completionRatio: new FormControl(dataItem.completionRatio),

      title: new FormControl({value:dataItem.title, disabled:true}),
     //title: new FormControl(dataItem.title),    });

  }

Basically this change makes the field not display at all. 

No answers yet. Maybe you can help?

Tags
Gantt
Asked by
Patrick
Top achievements
Rank 1
Share this question
or