Hi
I can't speak English. So I use Google Translate.
Please understand if the explanation is not natural.
I have two grids on the page.
If you select the row of the first grid, the data of the second grid is searched.
Implemented using the 'RowSelected' event of the first grid.
However, if there is no searched data of the second grid, the symptom of not disappearing the grid information occurs.
-My Code-
// First Gird
// gvCommGrpData.C_RETURN1 => C_RETURN1 IS IEnumerable<T1> TYPE
<SfGrid @ref="gvCommGrp" ID="@gvCommGrpId" DataSource="@gvCommGrpData.C_RETURN1" TValue="SM11030.CommGrp" >
<GridEvents RowSelected="gvCommGrp_RowSelected" TValue="SM11030.CommGrp" />
......
</SfGrid>
// Second Gird
// gvCommData.C_RETURN1 => C_RETURN1 IS IEnumerable<T1> TYPE
<SfGrid @ref="gvComm" ID="@gvCommId" DataSource="@gvCommData.C_RETURN1" TValue="SM11030.Comm" >
......
</SfGrid>
// First Gird RowSelected Event
public async Task gvCommGrp_RowSelected(RowSelectEventArgs<SM11030.CommGrp> arg)
{
gvCommData = await repository.GET_SEARCH_COMM(arg.Data.COMM_GRP_CD); // I use Dapper to look up the data.
gvComm.Refresh();
this.StateHasChanged();
}
Images are attached for your understanding.
First Step - The row was selected with the 'YESNO' value of the first grid. Two data were retrieved in the second grid.
Second Step - In the first grid, a row with a value of 'a' is selected. There is no data searched in the second grid. This is the result I want
Third Step - In the first grid, a row with a value of 'YESNO' is selected again. Same result as the first step
Fourth Step - In the first grid, select the row with the value 'a' again. The same behavior as the Second Step was performed, but the data did not disappear from the second grid.
Any help in solving this problem would be appreciated.