Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clicking a row in a subgrid causes the expanded main grid selection to collapse. #308

Open
topherZa opened this issue Sep 6, 2021 · 3 comments

Comments

@topherZa
Copy link

topherZa commented Sep 6, 2021

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.

@MarkEskander
Copy link

I am facing the same Problem, still no solution!

@topherZa
Copy link
Author

topherZa commented Feb 2, 2023

I am facing the same Problem, still no solution!

Yep I stopped using subgrids completely because of this issue

@SolidDesignCore
Copy link

Same Issue. Makes for very unfriendly SubGrids when working with lots of data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants