Hi
I have this fragment of code in vue component...
<ejs-treegrid
:allowPaging="true"
:allowRowDragAndDrop="checked"
:dataSource="data"
:pageSettings="pageSettings"
:rowDataBound="rowDataBound"
:rowDrag="onRowDrag"
:rowDragStart="onRowDragStart"
:rowDragStartHelper="onRowDragStartHelper"
:rowDrop="onRowDrop"
:rowDropSettings="rowDropSet"
:selectionSettings="selectionOptions"
:toolbar="toolbarOptions"
:treeColumnIndex="2"
@rowSelected="showRowInfo"
id="treegrid"
idMapping="WORK_ID"
parentIdMapping="PARENT_ID"
ref="treegrid"
>
<e-columns>
<e-column :commands="commands" headerText="Opciones" width="120"></e-column>
<e-column field="WORK_ID" headerText="Id" textAlign="Right" width="80"></e-column>
<e-column field="TITLE" headerText="Título" width="300"></e-column>
<e-column field="TAGS" headerText="Tags" textAlign="Right" width="200"></e-column>
<e-column field="STATUS" headerText="Estatus" width="120"></e-column>
<e-column field="WORK_TYPE" headerText="Tipo" width="120"></e-column>
<e-column field="REGISTERED_DATE_STR" format="yMd" headerText="Registro" textAlign="Right" width="140"></e-column>
<e-column field="UPDATE_DATE_STR" format="yMd" headerText="Actualizado" textAlign="Right" width="140"></e-column>
<e-column field="ELAPSED_DAYS" headerText="Días" textAlign="Right" width="80"></e-column>
</e-columns>
</ejs-treegrid>
...
onChangeCboProject: function(e) {
let project_id = this.getProjectId();
if (project_id === -1) return;
this.projectsGetAll(this.$endpoint_WORKS_GETALL, project_id);
// THIS LINE NOT WORKS,
this.$refs.treegrid.ej2Instances.collapseAtLevel(2);
},
I dont have any console errors, but the call to collapseAtLevel method doesnt do anything
Whats the right way to do it?
Thanks in advance