Error when doing Manual Grid Persistence with Foreign columns.

When I have foreign columns in my Grid and manually persist and restore I get the following error:

[2021-05-27T13:40:20.764Z] Error: System.AggregateException: One or more errors occurred. (The given key 'grid-column5' was not present in the dictionary.)
 ---> System.Collections.Generic.KeyNotFoundException: The given key 'grid-column5' was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at Syncfusion.Blazor.Grids.Internal.Edit`1.<>c__DisplayClass92_0.<GetColumnType>b__0(Row`1 _)
   at System.Collections.Generic.List`1.Find(Predicate`1 match)
   at Syncfusion.Blazor.Grids.Internal.Edit`1.GetColumnType(GridColumn Column, Type& actualType, String field, Object data)
   at Syncfusion.Blazor.Grids.SfGrid`1.SetColumnValueType()
   at Syncfusion.Blazor.Grids.SfGrid`1.OnAfterRenderAsync(Boolean firstRender)
   --- End of inner exception stack trace ---

Column 5 is a foreign column. 

How do I fix this?

Mike

3 Replies 1 reply marked as answer

VN Vignesh Natarajan Syncfusion Team May 28, 2021 05:09 AM UTC

Hi  Mike,  
 
Thanks for contacting Syncfusion support.  
 
Query: ” When I have foreign columns in my Grid and manually persist and restore I get the following error: 
 
From your query we understand that you are facing trouble when persisting the Grid state manually using the Grid methods. we need some more details about the issue you are facing. So kindly share the following details.  
 
  1. Share the details how you are storing the Grid state at your end.
  2. Are you storing the details in database?
  3. Share the video demonstration and replication procedure of the issue.
 
Above requested details will be very helpful for us to validate the reported query at our end and provide solution as early as possible.  
 
Regards, 
Vignesh Natarajan 



MC Mike Chafin May 31, 2021 05:47 PM UTC

1. The grid state is being stored in the AspNetUsers table. Each grid has its own column for the state info.
2. Yes, see above
3. 30 mb is not very much space for a video so I saved it at : https://www.screencast.com/t/eQ6j38K4


VN Vignesh Natarajan Syncfusion Team June 1, 2021 06:48 AM UTC

Hi Mike,  
 
Thanks for sharing the requested details.     
 
Query: “When I have foreign columns in my Grid and manually persist and restore I get the following error:”  
 
We have analyzed the reported issue and we are able to reproduce the reported issue at our end also. We have confirmed the reported query as a bug and logged the defect report “Exception occur in Grid when restoring the Grid state stored in database for the same. Thank you for taking the time to report this issue and helping us improve our product. At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle ) and including the defect fix in our weekly release which is expected to be rolled out by mid of June 2021. We will update you once the release is rolled out.     
        
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.        
    
  
Till then we appreciate your patience.   
 
Regards, 
Vignesh Natarajan 


Marked as answer
Loader.
Up arrow icon