Hi team,
I am using Ignite v9.1.28 Hierarchical grid load on demand.Requirement: I want to trigger OnGridCreated($event) method everytime user expands the parent row. As per current functionality it is storing the cache due to which there is some issue with inconsistency of data.Please help.
Hi Shobhana,
I believe as mentioned in several previous discussions such as these related threads – first, second, etc., you are familiar with version 9.1.x being long expired and not eligible for developer support.
To address your question, regardless of the version and according to the IgxRowIslandComponent API the gridCreated event is emmited when a grid is being created based on this row island. It is not particularly related to expanding/collapsing a parent record, except seemingly the first time when expanding triggers the child grid creation. As an event on an existing component, its purpose is not to be raised by the developer, and is merely the described by the API means of notifying a child grid being created. Note, this is not related to the data for any child grid being refreshed either.
An event that might suit your scenario would be the rowToggle (onRowToggle for version 9.1.28). It is emitted when the expanded state of a row gets changed. The event has to be handled for each row island in addition to the parent grid.
Best regards, Bozhidara Pachilova Associate Software Developer
Hi,Thanks for replying. But my requirement is to hit the gridCreated(event) method on row expansion. bcz of cache there is a bug with Infragistics to show the child data of previously expanded parent row. i am already using Row toggle method but i want to call gridCreated(event) everytime row is expanded.
Could you refer to the GitHub issue that you mention is a bug, so that we can verify whether it was fixed in newer versions? Or, if you think it is reproducible in the current ones, could you describe it more elaborately, so that we can investigate it. Although, it appears not to be reproduced in the Load on demand example in our documentation.
Consequently my suggestion is to also debug and verify your application logic, in terms of the proper IDs and data being passed along to the network requests, etc., to make sure everything is set up correctly in order to fetch each child data properly. Note, that it is possible that this caching behavior is due to some application-level logic.
In regards to “hitting the gridCreated event”, please, note the considerations in my previous reply. Having this in mind, you could always execute the logic from this event handler’s at the point you consider it should additionally be executed. I assume operations such as retrieving data and binding the child grid are done there, so it is worth nothing that the data could be refreshed after a grid was created as well.
Best regards, Bozhidara Pachilova