I am currently working with a master detail grid in Kendo Grid and using the Angular version of the Kendo Grid.
One interesting feature I have added is a custom button for adding a new record in each row of the grid. When this button is clicked, a new record is added below that particular row.
Here is the code snippet that is functioning as expected:
Button Template
<img src='images/save.png' ng-click='onClick()'
class='k-grid-add' title='Add new record' alt='Create'/>
The click function
$scope.onClick = function ()
{
var grid = $scope.grid;
var sel = grid.select();
var item = grid.dataItem(sel);
var index = grid.dataSource.indexOf(item);
grid.dataSource.insert(index + 1, {});
}
All seems to be working smoothly so far. However, I am now faced with the challenge of adding a similar button to each row in the child grid. The issue lies in retrieving the dataSource of the child grid within Angular. If I can access the child grid, I believe the above code can be utilized to add a new row based on the index.
Thank you for your time, please feel free to reach out if more information is needed.
Thanks