Hello,
Please, keep in mind that according to our support policy, we guarantee first response in 1 business day and subsequent interactions within 3 business days or less, for Standard subscription services. Having this in mind, we aim to address all your queries as soon as possible as per this policy, so thank you for understanding.
Also, please, note that the mentioned is not a limitation of the library, as we have already discussed the purpose and API of the gridCreated event, which is different form your initial understanding about it. As already mentioned, child data is not "cached". If you would like to update it, you are absolutely free to do this. The gridCreated event is related to the UI of the grid being created, and not the data. It allows you to access a point when the load on demand data can be fetched and assigned.It is obviously more performant not to rerender all UI-elements with each row toggle. Still, data could be updated and reflected by the grid at any given moment.
To address your latest question, the provided code-snippet will not update the child grid data every 20s, as it merely subscribes to the onGridCreated observable every 20s. I am unaware what the “getChildDataList” method does exactly, but assuming it only retrieves the data and then the “e.grid.data = this.bogieList;” is what assigns it, the latter is obviously not executing.
What I can suggest instead is using the gridCreated event on the target row island to set this interval instead. The following snippet updates the “Album” property of the data for the purposes of the example:
<igx-row-island
[key]="'Albums'"
…
(gridCreated)="gridCreated($event)"
>
public gridCreated(event: IGridCreatedEventArgs) {
const grid = event.grid;
let cnt = 1;
if (
(event.owner as IgxRowIslandComponent).key === 'Albums' &&
event.parentID === 2
) {
setInterval(() => {
let copyData = grid.data;
copyData.forEach((r) => {
if (r.hasOwnProperty('Album')) {
r[‘Album’] = r[‘Album’].split(' ')[0] + ' changed ' + cnt;
}
grid.data = […copyData];
grid.columns[0].autosize();
});
cnt++;
}, 2000);
}
}
This StackBlitz sample shows the target child grid data updated every 2 seconds. Please, test it on your side and let me know if you still need assistance. Please, note that the sample is against the latest Ignite UI for Angular version, nevertheless, the approach would be almost identical for you, except the gridCreated method name, which you are already familiar with.
Best regards,
Bozhidara Pachilova