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:
Hello,
The Hierarchical Grid Row Selection Example shows how the hideRowSelectors property can be dynamically toggled, as you are probably already familiar with. This property also exists in version 9.1.28. However, it controls the row selectors visibility for the entire row island, so I do not believe it is possible to have them visible on some rows and hidden on others through this property, if I understand the requirement correctly.
The mentioned button’s disabled state could also be set via property binding to a flag pointing when it should be disabled.
About saving the selection on reload, it is one of the features available on the IgxGridState directive, so please, refer to the State Persistence topic.
Having in mind that the described scenario is unclear, please fork and modify any the referenced topics demos to illustrate your point.
Best regards,
Bozhidara Pachilova
Please reply ASAP
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.
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?
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.