DataGrid with Dropdown list

Hi
I'm getting an error from the DataGrid component on selection of a value (Please see the attached error stack trace). Further to this, on editing the column, the dropdown lists do not show the related records when a valid is present within.
I have followed the examples based on the documentation but cannot see the issue. I have attached screens of where the error is happening, the error stack trace and the code for the datagrid along with the classes being used.
Can you give me any clues or a working example for a Blazor DataGrid with a dropdown list.
Many thanks
Mark

Attachment: Sample_Files_b3512973.zip

2 Replies 1 reply marked as answer

MS MST June 18, 2020 10:37 AM UTC

Replying with the solution here for the benefit of others. The solution was to change the TValue to int? After following this thread: https://www.syncfusion.com/forums/153669/tvalue-as-int64doesnt-work which highlights an issue with int64, I was able to track down the issue.


VN Vignesh Natarajan Syncfusion Team June 18, 2020 10:57 AM UTC

Hi MST,  
 
Thanks for the update.  
 
Query: “ Replying with the solution here for the benefit of others && The solution was to change the TValue to int? 
 
We are glad to hear that you have resolved your query one your own.  
 
Yes. In your code example you have defined the DropDownList with Text and Value inside the Grid Edit Template. So TValue of DropDownList must be based on type of Value property in DropDownField Settings. Similarly TItem must be same as the type of Datasource of DropDownList.   
 
Kindly get back to us if you have further queries.  
 
Regards, 
Vignesh Natarajan 


Marked as answer
Loader.
Up arrow icon