We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

i want button on child gird toolbar and on-click on this button i want selected row data into function

Hi Team,

I am using @syncfusion/ej2-angular-grids' component and i am stuck in child grid operation
i want two button on toolbar or row on-click event on this button component.ts  function should execute with selected row data.

Please help me on above issue pls give me example link if available.

1 Reply

BS Balaji Sekar Syncfusion Team August 8, 2019 07:29 AM

Hi Anup, 

Thanks for your patience, 

We have created a sample with your requirement and you can bind the custom button on toolbar using following code snippet. We have already discussed about the custom items rendering on toolbar in our Help Documentation and we have find the Grid selected records details in toolbarClick event of EJ2 Grid. Please refer the below code example, sample and Help Documentation. 


this.childGrid = { 
        dataSource: orderDatas, 
        queryString: 'EmployeeID', 
        allowPaging: true, 
        toolbar: [{ text: 'Click', tooltipText: 'Click', prefixIcon: 'e-expand', id: 'Click' }], // we have bind the custom button on toolbar 
        toolbarClick: function (args) { 
            if (args.item.id === 'Click') { 
                var selectedRecord = this.getSelectedRecords(); // we have get the selected records details 
        pageSettings: { pageSize: 6, pageCount: 5 }, 

Balaji Sekar. 

Live Chat Icon For mobile
Up arrow icon