tree grid single click edit problem

Hi,

I have some problem when using tree grid,

  1. Does the tree grid have the recordClick event, same as data grid's recordClick event, I only found the recordDouble Click event.
  2. I using the single click event, it will trigger  actionbegin with the begin edit twice, please check it. https://stackblitz.com/edit/angular-8zkhr4-eh1gjv?file=app.component.ts 
  3. When the parent record has no child, it will no sub. total line, can add it manual?


4. When add child record in the record sequence no. is 6, it will pop up the follow error, I don't know how the check the reason.





1 Reply

SM Shek Mohammed Asiq Abdul Jabbar Syncfusion Team May 15, 2023 05:18 PM UTC

Hi Lorryl,


Greetings from Syncfusion support.


Query #1 : Does the tree grid have the recordClick event, same as data grid's recordClick event, I only found the recordDouble Click event.


You can use recordClick event in treegrid from using grid instance. Please refer to the following code snippet.


created(args) {

    var instance = (document.getElementsByClassName('e-treegrid')[0as any)

      .ej2_instances[0];

    instance.grid.recordClick = (args=> {

      console.log(args.rowData.taskID);

    };

  }


Query #2 : I am using the single click event, it will trigger actionbegin with the begin edit twice, please check it.


On further validation, we have considered the reported issue (“ActionBegin with requestType beginEdit called twice”) as a bug. Thank you for taking the time to report this issue and helping us improve our product. At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle) and will include the fix in our upcoming patch release which is expected to be rolled at the end of May.


You can now track the status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link. 

https://www.syncfusion.com/feedback/43671/actionbegin-action-called-twice-while-on-row-editing-in-treegrid

Note: To view the above feedback, kindly login into your account. 

Disclaimer: Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.


Query #3 : When the parent record has no child, it will no sub. total line, can add it manual?


We have shown aggregate row to the parent record by adding empty child record to the empty parent record and hide the empty records by using rowDataBound event.


Please refer to the following code snippet:-


app.component.ts

dataBound(args) {

    if (isNullOrUndefined(args.data.progress)) {

      args.row.style.visibility = 'collapse'

    }

  }

 


app.component.html

<e-aggregates>

      <e-aggregate [showChildSummary]="true">

        <e-columns>

          <e-column

            field="progress"

            format="C2"

            type="Sum"

            columnName="progress"

          >

            <ng-template #footerTemplate let-data

              >{{ data.progress }}

            </ng-template>

          </e-column>

        </e-columns>

      </e-aggregate>

    </e-aggregates>

 


Sample : https://stackblitz.com/edit/angular-fvawxi?file=src%2Fapp.component.ts,src%2Fapp.component.html,src%2Fjsontreegriddata.ts,src%2Fapp%2Fapp.module.ts,package.json


Please refer to API for the rowDataBound event : https://ej2.syncfusion.com/angular/documentation/api/treegrid/#rowdatabound


Please refer to the documentation for aggregates : https://ej2.syncfusion.com/angular/documentation/treegrid/aggregates/footer-aggregate


If your requirement is different from above or do you want Parent value need to show on Aggregate row or any other customization to proceed further.


Query #4 : When add child record in the record sequence no. is 6, it will pop up the follow error, I don't know how the check the reason.


We cannot replicate the issue from our end while performing add action. Please provide us more details to replicate the issue from our end. Please refer to the sample below.

https://stackblitz.com/edit/angular-8zkhr4-hcetdx?file=app.component.ts,app.component.html


  1. Share CompleteTreeGrid code details.
  2. If possible replicate the issue from the shared sample and revert us back.


Kindly get back to us for more details.


Regards,

Shek Mohammed Asiq


Loader.
Up arrow icon