Hi Team,
Using 9.1.28 version of Infragistics Hierarichal grid load on demand.Requirement: I have rowSelectors in the child grid of Hierarichal Grid and a button in the Toolbar of the child Grid.I want to show/hide the row selectors and also disable row selection for the rows whose row selector is hidden.
HTMLParent Grid:
Hi Shobhana,
I can suggest reviewing the approach and sample from this other forum thread I have recently assisted you with.
There you will find an example of the requested updating and rebinding child grid data on its parent row toggle.
Why it does not currently work for you, I cannot tell because I cannot know what code does the “this.getChildData” method executes, whether or not it is async, what is the “this.apiResponse” variable, etc. Additionally, you will have to make sure you have the proper reference to a child grid to assign its data. Debugging might help here.
Again, please, refer to the sample and approach from the other thread, which I believe will address the same questions.
Best regards, Bozhidara Pachilova
Thank you for replying.
But this not what i am looking for.I am calling the backend API every 20 secs to get the updated data for the child grid. But my challenge is to bind the data to Child grid.On click of button in child grid toolbar, i update the grid data and it shows the updated Status but as the data is not binding. I have manually reload the page to get the updated data to grid.TS: This is giving me updated child data but not binding to grid. Can i access the child grid data like this.childGrid.data?
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:
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.
Please reply ASAP
Thank You but i am already aware of hideRowSelectors property and it is not helping me when using in Hierarichal grid Load on demand.When we expand Parent ID 1 first time, we call gridCreated($event) method. But if i expand Parent ID 2 where my hideSelectors should be true and again expand Parent ID 1, my hideSelectors property is setting as true which should not be the case. I know this is by design, where we cache the child data. But for my project it is creating a lot of obstacles.It is disappointing that library has so many limitations.Update: I have resolved the issue using rowToggle() method.Requirement: I update Child grid data every 20 secs so i need to update the child grid.TS: