Open topherZa opened 3 years ago
I am facing the same Problem, still no solution!
I am facing the same Problem, still no solution!
Yep I stopped using subgrids completely because of this issue
Same Issue. Makes for very unfriendly SubGrids when working with lots of data.
Describe the bug I have a grid with a subgrid and when I click on a row on the subgrid I want to show a modal which has more info about that item. I call StateHasChanged() to render the new component in the action that is fired by clicking on the row. That works fine except that the main grid then collapses, losing context of what item was expanded and which subitem was selected.
My guess at the problem: However the main grid knows a row is expanded (the GridPosition variable as far as I can tell) must be being updated when a sub grid row is clicked, and that has always happened, but because StateHasChanged would not normally have been called this problem hasn't been noticed before.
To Reproduce Steps to reproduce the behavior: I have updated the client side demo subgrids page to reflect the problem. Replace the code in the subgrids page demo with the below, then run the project, navigate to the subgrids page, expand a row by clicking the carat, click on a subgrid item row to fire the onclick event for the row, the main grid will collapase:
SubGrid.razor.txt
Expected behavior Whatever actions are executed but the main grid row that was expanded does not collapse automatically.
Additional context Is there any addtitional API that can be used like cGrid.SelectRow(rowIndex) to expand a row? As I can then use that as a short term solution to exand the row again after it's been collapsed automatically.