Hi,
I'd like to know if i can hide one of more child grid depending on the row that i'm expanding ?
for example : let say that in my grid , i've set the configuration in order to have two layouts ( child1 and child2 ). but some of my results doesn't have anything to display in one of those child grid. is that possible to hide let say the 'child1' grid when i'm about to reveal the child grids ?.
I guess that i could , with a simple jquery code, point to the right child grid and hide it , but i was expecting that maybe i could avoid generating the whole child grid at all .
thank you
regards
Hello,
Programmatically not rendering a child band is not supported. The way I suggest handling this scenario is by handling the rowExpanded event and utilize jQuery to find and hide the appropriate child grid when a grid is found to have no data.
Let me know if you have any questions.
Thank you for your answer.
I tried to cancel the event "childGridCreating" as it says in the documentation that is cancellable, but it doesn't work ( i've put 'return false' but it doesn't cancel the event ). Do i need something else to cancel that event or it cannot be canceled ( in that case , the documentation should be updated ).
Again thank you.
The childGridCreating only triggers when the child grid is initially rendered. Try expanding the same child band twice and the event will only trigger on the initial expand. With this information I would think this event is not what you are looking to handle in this specific scenario. I recommend utilizing the steps detailed in my previous post.
Regarding the childGridCreating event not being cancellable, I was able to reproduce this behavior and will be taking a deeper look into this.
Ok then i'll give a try with those steps you've mentioned .
Regards
Glad to help out.
Let me know if you encounter any issues along the way or have any further questions.