I changed the DataSource but the grid doesn't refresh.

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.

3 Replies

VN Vignesh Natarajan Syncfusion Team September 25, 2020 11:22 AM UTC

Hi JaeHyeong,  

Thanks for contacting Syncfusion support.  

Query: “However, if there is no searched data of the second grid, the symptom of not disappearing the grid information occurs. 
  
We have validated the reported issue and we are able to reproduce the reported issue at our end while preparing a sample as per your suggestion. Since it is a known issue we have considered it as a bug and logged the defect report for the same “Problem with dynamic DataSource change in Grid with empty data”. Thank you for taking the time to report this issue and helping us improve our product. Fix for the issue will be included in our upcoming 2020 Volume 3 release which is expected to be rolled out by end of this month, September 2020.  
 
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.      
  
 
Note: kindly login into your account to view the feedback  
 
Till then we appreciate your patience.   

Regards, 
Vignesh Natarajan 





JJ JaeHyeong Jang September 28, 2020 01:59 AM UTC

Thanks for the reply.
I look forward to the good news.


RS Renjith Singh Rajendran Syncfusion Team September 28, 2020 01:52 PM UTC

Hi JaeHyeong, 

Thanks for your update. 

As promised we will fix the reported problem in our upcoming Volume 3, 2020 release. Please follow up on the provided feedback link for future updates regarding this issue. 

Regards, 
Renjith Singh Rajendran 


Loader.
Up arrow icon