Gantt Hierarcy Selection

Hello,

I am working with Gantt component. Let's assume there are y values belonging to x values. There's actually a third-level hierarchy. When I select the first parent, all x values and their corresponding y values are selected. However, when I select only the x values, their corresponding y values are not highlighted. Although they are selected in the background, they do not appear highlighted in the interface. This results in a poor user experience, as users cannot tell if the y values are selected, which may cause them to not receive the expected output from their actions.


In the link provided below, I can see a similar feature implemented with a grid component, but I want to achieve this with the Gantt component. When a user selects one of the x values, all corresponding y values should be selected. For example, after the user selects all y values, they might want to deselect one of them. I want to ensure this functionality is provided. 

-> https://stackblitz.com/edit/react-uyjgxh-n4jkae?file=index.js

for example: 

scenario 1: when I select node 1, then all 2 and 3 values I mean X and Y values are selected. Its correct (Screenshoot 1). 

scenario 2: when i select one of 2 values, then y values belongs to the x are checked. Its also correct (Screenshot 2).

Screenshoot 1:

Image_6382_1722584425470

Screenshoot 2: 

Image_4362_1722584772426


Lets contunie with my issue: 1 scenario works properly on my application but second scenario doesnt work as i expected. I choose one of x value but y values are not highlighted.

Image_1751_1722585087219


Thank you.


10 Replies

SJ Sridharan Jayabalan Syncfusion Team August 5, 2024 02:07 PM UTC

Hi Fatma,


Greetings from Syncfusion.

 

To achieve the requirement in Gantt chart, We suggest to use the "Created" event and setting the "showCheckBox" property to "true" in the column of the Gantt chart. Inside the event, we enabled the  treeGrid autoCheckHierarchy property. Now, After checking in the parent, all children are also checked. Then, unchecking the parent will also uncheck the children. We have attached a code snippet and a sample for reference.


Code-Snippet:   

  const columns = [
    {
      field: 'custom',
      showCheckbox: true,
      width: 80,
    },
  ];


const created = (args) => {
    var treeGridInstance =
      document.getElementById('treeGridEditing').ej2_instances[0];
   treeGridInstance.autoCheckHierarchy = true;  
  };

 

Sample - Yr5nx4 (forked) - StackBlitz

Demo - Tree Grid · Checkbox Selection · Syncfusion React UI Components

Documentation - Check box selection in React Grid component | Syncfusion

 


Regards,

Sridharan



FM Fatma Mutlu August 8, 2024 09:27 AM UTC

Hi  Sridharan,

I find your examples good, it is absolutely what I mentioned but I really tried hard to implement those codes but I couldnt achieve. Maybe its related what i use in my codes. The difference  is actually I use class component and Typescript. And I can not use easily the code below. 

 const created = (args=> {
    var treeGridInstance =
      document.getElementById('treeGridEditing').ej2_instances[0];
    treeGridInstance.autoCheckHierarchy = true;
  };


when i iplement those codes in my project by using class component and typescript, I can not see what i expected on UI. What should I do?


Thanks,



UA Udhayakumar Anand Syncfusion Team August 9, 2024 12:11 PM UTC

Fatma


We have reviewed your inquiry and developed a sample using TypeScript and a class component. Below, you will find the sample and a code snippet demonstrating how to utilize the created event.


Code Snippet :

private created = (args: any) => {

    const treeGridInstance = (document.getElementById('treeGridEditing') as any).ej2_instances[0];

    treeGridInstance.autoCheckHierarchy = true;

  };

 

<GanttComponent

   created={this.created}


Sample Link : https://www.syncfusion.com/downloads/support/directtrac/general/ze/react_class-226776362


Regards,

Udhayakumar



EA Emrah Asma replied to Udhayakumar Anand August 9, 2024 01:12 PM UTC

Hi,

I still got this error. Why did I get this error I dont know and I dont understand. 

What was wrong with it?


Thanks

Image_6251_1723208204620


Image_9996_1723208890943

 private created = (args: any) => {
    const treeGridInstance = (document.getElementById('treeGridEditing') as any).ej2_instances[0];
    treeGridInstance.autoCheckHierarchy = true;
  };

This is my gantt below:

<GanttComponent
                  id='cloud-scheduler-gantt'
                  dataSource={this.state.GantData}
                  created={this.created}
                  ref={(gant: GanttComponent) => (this.gantObj = gant)}
                  dateFormat='dd/MM/yyyy HH:mm'
                  durationUnit='Hour'
                  actionComplete={this.actionCompletedElement.bind(this)}
                  actionBegin={this.actionBegin.bind(this)}
                  dataBound={this.dataBound.bind(this)}
                  treeColumnIndex={0}
                  contextMenuItems={this.contextMenuItems}
                  contextMenuOpen={this.contextMenuOpen.bind(this)}
                  contextMenuClick={this.contextMenuClick.bind(this)}
                  showColumnMenu={true}
                  width={'100%'}
                  allowFiltering={true}
                  selectionSettings={{
                    type: 'Multiple',
                    mode: 'Row',
                    enableToggle: true,
                  }}
                  allowSorting={true}
                  connectorLineBackground='red'
                  allowResizing={true}
                  workWeek={[
                    'Monday',
                    'Tuesday',
                    'Wednesday',
                    'Thursday',
                    'Friday',
                    'Saturday',
                    'Sunday',
                  ]}
                  toolbarClick={this.toolbarClick.bind(this)}
                  editDialogFields={this.editDialogFields}
                  projectStartDate={this.state.projectStartDate}
                  projectEndDate={this.state.projectEndDate}
                  allowRowDragAndDrop={false}
                  queryCellInfo={this.gantCellQuery.bind(this)}
                  rowSelected={this.rowSelected}
                  rowDeselected={this.rowDeselected}
                  //enablePredecessorValidation ={false}
                  //autoCalculateDateScheduling={false}
                  taskFields={{
                    id: 'TaskID',
                    name: 'TaskName',
                    startDate: 'StartDate',
                    endDate: 'EndDate',
                    duration: 'Duration',
                    progress: 'Progress',
                    dependency: 'Predecessor',
                    child: 'subtasks',
                    notes: 'info',
                    resourceInfo: 'Resources',
                    segments: 'Segments',
                    work: 'Work',
                  }}
                  timelineSettings={this.timelineSettings}
                  labelSettings={this.labelSettings}
                  editSettings={
                    this.state.current_plan_isLocked
                      ? undefined
                      : this.editSettings
                  }
                  height={
                    this.state.status
                      ? 'calc(-130px + 70vh)'
                      : 'calc(-130px + 100vh)'
                  }
                  gridLines={'Both'}
                  toolbar={
                    this.props.isSuperVisor ? this.toolbarAdmin : this.toolbar
                  }
                  resourceFields={this.resourceFields}
                  resources={this.state.resourceData}
                  enableContextMenu={true}
                  filterSettings={{ type: 'Menu' }}
                  allowExcelExport={true}
                  allowPdfExport={true}
                  allowReordering={true}
                  highlightWeekends={true}
                  enableVirtualization={true}
                  splitterSettings={{
                    columnIndex: 2,
                    position: '60%',
                  }}
                  dayWorkingTime={this.state.dayWorkingTime}
                  timezone={Intl.DateTimeFormat().resolvedOptions().timeZone}
                >
                  <ColumnsDirective>
                    {columns.map((el: any) => {
                      return (
                        <ColumnDirective
                          key={el.field}
                          field={el.field}
                          headerText={el.headerText}
                          width={el.width}
                          visible={el.visible}
                          editType={el.editType}
                          edit={el.edit}
                          type={el.type}
                          format={el.format}
                          allowEditing={el.allowEditing}
                          displayAsCheckBox={el.displayAsCheckBox}
                          template={el.template}
                        />
                      );
                    })}
                  </ColumnsDirective>
                  <EditDialogFieldsDirective>
                    {editDialogFields.map((el) => {
                      return (
                        <EditDialogFieldDirective
                          key={el.type}
                          type={el.type as any}
                          headerText={el.headerText}
                        />
                      );
                    })}
                  </EditDialogFieldsDirective>
                  <Inject
                    services={[
                      Edit,
                      Selection,
                      Toolbar,
                      DayMarkers,
                      CriticalPath,
                      Resize,
                      ColumnChooser,
                      Filter,
                      ContextMenu,
                      ColumnMenu,
                      VirtualScroll,
                      ExcelExport,
                      PdfExport,
                      Sort,
                      Reorder,
                      RowDD
                    ]}
                  />
                </GanttComponent>


EA Emrah Asma August 12, 2024 06:18 AM UTC

Hi, my react version is:

Image_4018_1723443474981




SJ Sridharan Jayabalan Syncfusion Team August 12, 2024 02:15 PM UTC

Fatma,

 

We were able to replicate the issue. The cause is a mismatch between the IDs used when creating treeGridInstance. We have now attached the modified code snippets, which you can use for any IDs in your application.

 

Code-Snippet:   

 

  private created = (args: any) => {

 

    const treeGridInstance = (document.getElementById('treeGrid'+this.gantObj.element.id)

as any).ej2_instances[0];

 

    treeGridInstance.autoCheckHierarchy = true;

 

  };

 

Modified Sample -  https://www.syncfusion.com/downloads/support/directtrac/general/ze/reactTsx-1660126785.zip

 


Regards,

Sridharan



EA Emrah Asma August 13, 2024 08:34 AM UTC

Hi again,

The code above, doesn't do what I want. I think the problem is about columns and Columns directive component use. Can you send me a code with Columns Directive component. Here It's my columns list. I also changed

  {
    displayAsCheckBox: true,
    type: 'checkbox',
    width: 75,
    field: 'isChecked',
  },


  to
  {
    field: 'custom',
    showCheckbox: true,
    width: 80,
    type:"checkbox",
  },


but it doesn't do what I want.



export const columns = [
  {
    width: 50,
    field: 'pronto_row_id',
    headerText: 'Task ID',
    visible: false,
    allowEditing: false,
  },
  {
    displayAsCheckBox: true,
    type: 'checkbox',
    width: 75,
    field: 'isChecked',
  },
  {
    width: 200,
    field: 'TaskID',
    headerText: 'Task ID',
    isPrimaryKey: true,
    visible: false,
    allowEditing: false,

  },
  {
    field: 'order_code',
    headerText: 'Order#',
    width: 85,
    allowEditing: false,
  },
  {
    field: 'asset_code',
    headerText: 'Asset',
    width: 60,
    allowEditing: false,
  },
  {
    field: 'operationSequence',
    headerText: 'Operation Sequence',
    width: 40,
    allowEditing: false,
  },
  {
    field: 'TaskName',
    headerText: 'Job Name',
    clipMode: 'EllipsisWithTooltip',
    width: 400,
  },
  {
    field: 'tradeCode',
    headerText: 'Trade',
    width: 60,
    allowEditing: true,
    edit: getParamsDD(
      { text: 'trade_code', value: 'trade_id' },
      'tradeCode',
      'trade'
    ),
  },
  {
    field: 'required',
    headerText: 'Reqd',
    width: 60,
    allowEditing: true,
    type: 'numeric',
    format: 'c2',
    editType: 'numericedit',
    edit: { params: { min: 1, max: 10000 } },
  },
  {
    field: 'Duration',
    headerText: 'Dur',
    width: 60,
    visible: false,
  },
  {
    field: 'Work',
    headerText: 'Work',
    width: 90,
    edit: { params: { min: 0, max: 10000 } },
  },
  {
    width: 60,
    field: 'shift',
    headerText: 'Shift',
    allowEditing: true,
    edit: getParamsDD(
      { text: 'rosterCode', value: 'rosterId' },
      'shift',
      'shift'
    ),
  },
  {
    field: 'teamCode',
    headerText: 'Team',
    width: 60,
    allowEditing: true,
    edit: getParamsDD(
      { text: 'team_code', value: 'team_id' },
      'teamCode',
      'team'
    ),
  },
  {
    width: 150,
    field: 'StartDate',
    // format:'dd/MM/yyyy HH:mm',
  },
  {
    width: 150,
    field: 'EndDate',
    // format:'dd/MM/yyyy HH:mm',
  },
  {
    field: 'priority_code',
    headerText: 'Priority',
    width: 40,
    visible: false,
    allowEditing: false,
  },
  {
    field: 'status_code',
    headerText: 'Status Code',
    width: 65,
    visible: true,
    allowEditing: true,
    edit: getParamsDD(
      { value: 'value', text: 'alias' },
      'status_code',
      'global-filter?where=operation$status$isEnabled€1'
    ),
  },
  {
    width: 40,
    field: 'type_code',
    headerText: 'Type',
    visible: false,
    allowEditing: false,
  },
  {
    width: 70,
    field: 'order_resp_code',
    headerText: 'Resp',
    allowEditing: true,
    edit: getParamsDD(
      { value: 'sys_tbl_code', text: 'sys_description' },
      'order_resp_code',
      'system-config?where=P2'
    ),
  },

  {
    width: 60,
    field: 'Progress',
    visible: false,
  },
  {
    width: 80,
    field: 'planned_by',
    headerText: 'Planned By',
    visible: false,
  },
  {
    visible: false,
    field: 'description',
    headerText: 'WO Description',
  },
  {
    width: '150',
    field: 'site_details_1',
    headerText: 'Asset Type',
    visible: false,
  },
  {
    width: '250',
    field: 'long_description',
    headerText: 'Op. Description',
    visible: false,
  },
  {
    width: '150',
    field: 'description',
    headerText: 'WO Description',
    visible: false,
  },
  {
    width: '150',
    field: 'Predecessor',
    visible: false,
  },
  {
    width: 70,
    field: 'isRejected',
    headerText: 'ISRESCHEDULED',
    visible: true,
    allowEditing: false,
    template: isRejected,
  },
  {
    width: 70,
    field: 'isDone',
    headerText: 'ISDONE',
    visible: false,
    allowEditing: false,
  },
];



 <GanttComponent
                  id='cloud-scheduler-gantt'
                  dataSource={this.state.GantData}
                  ref={(gant: GanttComponent) => (this.gantObj = gant)}
                  dateFormat='dd/MM/yyyy HH:mm'
                  durationUnit='Hour'
                  actionComplete={this.actionCompletedElement.bind(this)}
                  actionBegin={this.actionBegin.bind(this)}
                  dataBound={this.dataBound.bind(this)}
                  treeColumnIndex={1}
                  contextMenuItems={this.contextMenuItems}
                  contextMenuOpen={this.contextMenuOpen.bind(this)}
                  contextMenuClick={this.contextMenuClick.bind(this)}
                  showColumnMenu={true}
                  width={'100%'}
                  allowFiltering={true}
                  selectionSettings={{
                    type: 'Multiple',
                    mode: 'Row',
                    enableToggle: true,
                  }}
                  created={this.created.bind(this)}
                  allowSorting={true}
                  connectorLineBackground='red'
                  allowResizing={true}
                  workWeek={[
                    'Monday',
                    'Tuesday',
                    'Wednesday',
                    'Thursday',
                    'Friday',
                    'Saturday',
                    'Sunday',
                  ]}
                  toolbarClick={this.toolbarClick.bind(this)}
                  editDialogFields={this.editDialogFields}
                  projectStartDate={this.state.projectStartDate}
                  projectEndDate={this.state.projectEndDate}
                  allowRowDragAndDrop={false}
                  queryCellInfo={this.gantCellQuery.bind(this)}
                  rowSelected={this.rowSelected}
                  rowDeselected={this.rowDeselected}
                  taskFields={{
                    id: 'TaskID',
                    name: 'TaskName',
                    startDate: 'StartDate',
                    endDate: 'EndDate',
                    duration: 'Duration',
                    progress: 'Progress',
                    dependency: 'Predecessor',
                    child: 'subtasks',
                    notes: 'info',
                    resourceInfo: 'Resources',
                    segments: 'Segments',
                    work: 'Work',
                  }}
                  timelineSettings={this.timelineSettings}
                  labelSettings={this.labelSettings}
                  editSettings={
                    this.state.current_plan_isLocked
                      ? undefined
                      : this.editSettings
                  }
                  height={
                    this.state.status
                      ? 'calc(-130px + 70vh)'
                      : 'calc(-130px + 100vh)'
                  }
                  gridLines={'Both'}
                  toolbar={
                    this.props.isSuperVisor ? this.toolbarAdmin : this.toolbar
                  }
                  resourceFields={this.resourceFields}
                  resources={this.state.resourceData}
                  enableContextMenu={true}
                  filterSettings={{ type: 'Menu' }}
                  allowExcelExport={true}
                  allowPdfExport={true}
                  allowReordering={true}
                  highlightWeekends={true}
                  enableVirtualization={true}
                  splitterSettings={{
                    columnIndex: 2,
                    position: '60%',
                  }}
                  dayWorkingTime={this.state.dayWorkingTime}
                  timezone={Intl.DateTimeFormat().resolvedOptions().timeZone}
                >
                  <ColumnsDirective>
                    {columns.map((el: any) => {
                      return (
                        <ColumnDirective
                          key={el.field}
                          field={el.field}
                          headerText={el.headerText}
                          width={el.width}
                          visible={el.visible}
                          editType={el.editType}
                          edit={el.edit}
                          type={el.type}
                          format={el.format}
                          allowEditing={el.allowEditing}
                          displayAsCheckBox={el.displayAsCheckBox}
                          template={el.template}
                        />
                      );
                    })}
                  </ColumnsDirective>
                  <EditDialogFieldsDirective>
                    {editDialogFields.map((el) => {
                      return (
                        <EditDialogFieldDirective
                          key={el.type}
                          type={el.type as any}
                          headerText={el.headerText}
                        />
                      );
                    })}
                  </EditDialogFieldsDirective>
                  <Inject
                    services={[
                      Edit,
                      Selection,
                      Toolbar,
                      DayMarkers,
                      CriticalPath,
                      Resize,
                      ColumnChooser,
                      Filter,
                      ContextMenu,
                      ColumnMenu,
                      VirtualScroll,
                      ExcelExport,
                      PdfExport,
                      Sort,
                      Reorder,
                    ]}
                  />
                </GanttComponent>



created() {
    const treeGridInstance = (document.getElementById('treeGrid'+this.gantObj.element.id) as any).ej2_instances[0];
        treeGridInstance.autoCheckHierarchy = true;

  }



Thanks



SJ Sridharan Jayabalan Syncfusion Team August 14, 2024 12:26 PM UTC

Emrah,

 

We were able to replicate the issue when using type: "checkbox" and showCheckbox: true in the same column. Therefore, we suggest using only showCheckbox: true for your checkbox column to achieve the actual requirement. Refer the modified code snippet for your reference.

 

Code-Snippet:   

{

      field: 'custom',

      showCheckbox: true,

      width: 80,

      //type:"checkbox",

    },

 

Modified Sample - https://www.syncfusion.com/downloads/support/directtrac/general/ze/checkBoxReactTSX_1273508408.zip

 

If we misunderstood, please elaborate do you want to use both type: checkbox and showCheckbox functionalities or you need to achieve only autoHierarchical checkbox selection in your application.

 

 

Regards,

Sridharan



EA Emrah Asma August 19, 2024 08:12 AM UTC

Hi, Sridharan


I copy paste your code to my vscode and It doesn't work for me but it works on your stackblitz render page. The codes I paste:

 private created = (args: any) => {
    const treeGridInstance = (document.getElementById('treeGrid'+this.gantObj.element.id) as any).ej2_instances[0];
    treeGridInstance.autoCheckHierarchy = true;
  };



 private columns:any = [
    {
      width: 50,
      field: 'pronto_row_id',
      headerText: 'Task ID',
      visible: false,
      allowEditing: false,
    },
    {
      field: 'custom',
      showCheckbox: true,
      width: 80,
      //type:"checkbox",
    },
    {
      width: 200,
      field: 'TaskID',
      headerText: 'Task ID',
     isPrimaryKey: true,
      visible: false,
      allowEditing: false,
    },
    {
      field: 'order_code',
      headerText: 'Order#',
      width: 85,
      allowEditing: false,
    },
    {
      field: 'asset_code',
      headerText: 'Asset',
      width: 60,
      allowEditing: false,
    },
    {
      field: 'operationSequence',
      headerText: 'Operation Sequence',
      width: 40,
      allowEditing: false,
    },
    {
      field: 'TaskName',
      headerText: 'Job Name',
      clipMode: 'EllipsisWithTooltip',
      width: 400,
    },
    {
      field: 'tradeCode',
      headerText: 'Trade',
      width: 60,
      allowEditing: true,
      // edit: getParamsDD(
      //   { text: 'trade_code', value: 'trade_id' },
      //   'tradeCode',
      //   'trade'
      // ),
    },
    {
      field: 'required',
      headerText: 'Reqd',
      width: 60,
      allowEditing: true,
      type: 'numeric',
      format: 'c2',
      editType: 'numericedit',
      edit: { params: { min: 1, max: 10000 } },
    },
    {
      field: 'Duration',
      headerText: 'Dur',
      width: 60,
      visible: false,
    },
    {
      field: 'Work',
      headerText: 'Work',
      width: 90,
      edit: { params: { min: 0, max: 10000 } },
    },
    {
      width: 60,
      field: 'shift',
      headerText: 'Shift',
      allowEditing: true,
      // edit: getParamsDD(
      //   { text: 'rosterCode', value: 'rosterId' },
      //   'shift',
      //   'shift'
      // ),
    },
    {
      field: 'teamCode',
      headerText: 'Team',
      width: 60,
      allowEditing: true,
      // edit: getParamsDD(
      //   { text: 'team_code', value: 'team_id' },
      //   'teamCode',
      //   'team'
      // ),
    },
    {
      width: 150,
      field: 'StartDate',
      // format:'dd/MM/yyyy HH:mm',
    },
    {
      width: 150,
      field: 'EndDate',
      // format:'dd/MM/yyyy HH:mm',
    },
    {
      field: 'priority_code',
      headerText: 'Priority',
      width: 40,
      visible: false,
      allowEditing: false,
    },
    {
      field: 'status_code',
      headerText: 'Status Code',
      width: 65,
      visible: true,
      allowEditing: true,
      // edit: getParamsDD(
      //   { value: 'value', text: 'alias' },
      //   'status_code',
      //   'global-filter?where=operation$status$isEnabled€1'
      // ),
    },
    {
      width: 40,
      field: 'type_code',
      headerText: 'Type',
      visible: false,
      allowEditing: false,
    },
    {
      width: 70,
      field: 'order_resp_code',
      headerText: 'Resp',
      allowEditing: true,
      // edit: getParamsDD(
      //   { value: 'sys_tbl_code', text: 'sys_description' },
      //   'order_resp_code',
      //   'system-config?where=P2'
      // ),
    },

    {
      width: 60,
      field: 'Progress',
      visible: false,
    },
    {
      width: 80,
      field: 'planned_by',
      headerText: 'Planned By',
      visible: false,
    },
    {
      visible: false,
      field: 'description',
      headerText: 'WO Description',
    },
    {
      width: '150',
      field: 'site_details_1',
      headerText: 'Asset Type',
      visible: false,
    },
    {
      width: '250',
      field: 'long_description',
      headerText: 'Op. Description',
      visible: false,
    },
    {
      width: '150',
      field: 'description',
      headerText: 'WO Description',
      visible: false,
    },
    {
      width: '150',
      field: 'Predecessor',
      visible: false,
    },
    {
      width: 70,
      field: 'isRejected',
      headerText: 'ISRESCHEDULED',
      visible: true,
      allowEditing: false,
      // template: isRejected,
    },
    {
      width: 70,
      field: 'isDone',
      headerText: 'ISDONE',
      visible: false,
      allowEditing: false,
    },
  ];



  <GanttComponent
                  id='cloud-scheduler-gantt'
                  dataSource={[
                    {
                      TaskID: 1,
                      TaskName: 'Project initiation',
                      StartDate: new Date('04/02/2024'),
                      EndDate: new Date('04/21/2024'),
                      subtasks: [
                        {
                          TaskID: 2,
                          TaskName: 'Identify site location',
                          StartDate: new Date('04/02/2024'),
                          Duration: 0,
                          Progress: 30,
                          resources: [1],
                          info: 'Measure the total property area alloted for construction',
                          isExpand: false,
                          subtasks: [
                            {
                              TaskID: 3,
                              TaskName: 'Perform Soil test',
                              StartDate: new Date('04/02/2024'),
                              Duration: 4,
                              Predecessor: '2',
                              resources: [2, 3, 5],
                              info:
                                'Obtain an engineered soil test of lot where construction is planned.' +
                                'From an engineer or company specializing in soil testing',
                            },
                            {
                              TaskID: 4,
                              TaskName: 'Soil test approval',
                              StartDate: new Date('04/02/2024'),
                              Duration: 0,
                              Predecessor: '3',
                              Progress: 30,
                            },
                          ],
                        },
                        {
                          TaskID: 5,
                          TaskName: 'Identify site location',
                          StartDate: new Date('04/02/2024'),
                          Duration: 0,
                          Progress: 30,
                          resources: [1],
                          info: 'Measure the total property area alloted for construction',
                          isExpand: false,
                          subtasks: [
                            {
                              TaskID: 6,
                              TaskName: 'Perform Soil test',
                              StartDate: new Date('04/02/2024'),
                              Duration: 4,
                              Predecessor: '2',
                              resources: [2, 3, 5],
                              info:
                                'Obtain an engineered soil test of lot where construction is planned.' +
                                'From an engineer or company specializing in soil testing',
                            },
                            {
                              TaskID: 7,
                              TaskName: 'Soil test approval',
                              StartDate: new Date('04/02/2024'),
                              Duration: 0,
                              Predecessor: '3',
                              Progress: 30,
                            },
                          ],
                        },
                      ],
                    },
                  ]}
                created={this.created}
                 ref={(gant: GanttComponent) => (this.gantObj = gant)}
                  dateFormat='dd/MM/yyyy HH:mm'
                  durationUnit='Hour'
                  // actionComplete={this.actionCompletedElement.bind(this)}
                  // actionBegin={this.actionBegin.bind(this)}
                  // dataBound={this.dataBound.bind(this)}
                  treeColumnIndex={1}
                  // contextMenuItems={this.contextMenuItems}
                  // contextMenuOpen={this.contextMenuOpen.bind(this)}
                  // contextMenuClick={this.contextMenuClick.bind(this)}
                  showColumnMenu={true}
                  width={'100%'}
                  allowFiltering={true}
                  selectionSettings={{
                    type: 'Multiple',
                    mode: 'Row',
                    enableToggle: true,
                  }}
                  allowSorting={true}
                  connectorLineBackground='red'
                  allowResizing={true}
                  workWeek={[
                    'Monday',
                    'Tuesday',
                    'Wednesday',
                    'Thursday',
                    'Friday',
                    'Saturday',
                    'Sunday',
                  ]}
                 // toolbarClick={this.toolbarClick.bind(this)}
                  //editDialogFields={this.editDialogFields}
                  // projectStartDate={this.state.projectStartDate}
                  // projectEndDate={this.state.projectEndDate}
                  allowRowDragAndDrop={false}
                 // queryCellInfo={this.gantCellQuery.bind(this)}
               ///   rowSelected={this.rowSelected}
                //  rowDeselected={this.rowDeselected}
                  //enablePredecessorValidation ={false}
                  //autoCalculateDateScheduling={false}
                  taskFields={{
                    id: 'TaskID',
                    name: 'TaskName',
                    startDate: 'StartDate',
                    endDate: 'EndDate',
                    duration: 'Duration',
                    progress: 'Progress',
                    dependency: 'Predecessor',
                    child: 'subtasks',
                    notes: 'info',
                    resourceInfo: 'Resources',
                    segments: 'Segments',
                    work: 'Work',
                  }}
                //  timelineSettings={this.timelineSettings}
                 // labelSettings={this.labelSettings}
                  // editSettings={
                  //   this.state.current_plan_isLocked
                  //     ? undefined
                  //     : this.editSettings
                  // }
                  height={
                   550
                  }
                  gridLines={'Both'}
                  // toolbar={
                  //   this.props.isSuperVisor ? this.toolbarAdmin : this.toolbar
                  // }
                  //resourceFields={this.resourceFields}
                 // resources={this.state.resourceData}
                  enableContextMenu={true}
                  filterSettings={{ type: 'Menu' }}
                  allowExcelExport={true}
                  allowPdfExport={true}
                  allowReordering={true}
                  highlightWeekends={true}
                  enableVirtualization={true}
                  columns={this.columns}
                  splitterSettings={{
                    columnIndex: 2,
                    position: '60%',
                  }}
                //  dayWorkingTime={this.state.dayWorkingTime}
                 // timezone={Intl.DateTimeFormat().resolvedOptions().timeZone}
                >
                  {/* <ColumnsDirective>
                    {columns.map((el: any) => {
                      return (
                        <ColumnDirective
                          key={el.field}
                          field={el.field}
                          headerText={el.headerText}
                          width={el.width}
                          visible={el.visible}
                          editType={el.editType}
                          edit={el.edit}
                          type={el.type}
                          format={el.format}
                          allowEditing={el.allowEditing}
                          displayAsCheckBox={el.displayAsCheckBox}
                          template={el.template}
                        />
                      );
                    })}
                  </ColumnsDirective>
                  <EditDialogFieldsDirective>
                    {editDialogFields.map((el) => {
                      return (
                        <EditDialogFieldDirective
                          key={el.type}
                          type={el.type as any}
                          headerText={el.headerText}
                        />
                      );
                    })}
                  </EditDialogFieldsDirective> */}
                  <Inject
                    services={[
                      Edit,
                      Selection,
                      Toolbar,
                      DayMarkers,
                      CriticalPath,
                      Resize,
                      Filter,
                      ContextMenu,
                      ColumnMenu,
                      VirtualScroll,
                      ExcelExport,
                      PdfExport,
                      Sort,
                      Reorder,
                      RowDD
                    ]}
                  />
                </GanttComponent>



and you can see the video below.


Attachment: 20240819_110943_f471e0b9.rar


SJ Sridharan Jayabalan Syncfusion Team August 20, 2024 02:54 PM UTC

Emrah,

 

Thanks for sharing the details. For your query, we have tried to replicate the issue at our end but unable to reproduce it. We have prepared sample with your shared code snippets but the sample working fine as expected. So, share us the below requested details.

 

  1. Complete Gantt Code details.
  2. Share your timeZone.
  3. Kindly reproduce your reported issue in the below attached sample and revert us back to proceed further.

 

Modified Sample - https://www.syncfusion.com/downloads/support/directtrac/general/ze/checkBoxLast-306131040

Video - https://www.syncfusion.com/downloads/support/directtrac/general/ze/checkBoxVd-214579796

 

 

Regards,

Sridharan


Loader.
Up arrow icon