I am trying to use the DataGrid and I'm getting an error on binding. The error is:
Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100] Unhandled exception rendering component: Unable to set property 'DataSource' on object of type 'IgniteUI.Blazor.Controls.DataGrid'. The error was: Blazor.platform.readInt64Field is not a function
The grid is a very simple grid defined:
<DataGrid Width="100%" Height="100%" AutoGenerateColumns="false" DataSource="HmpContractors"> <NumericColumn Field="Id" IsHidden="true" /> <TextColumn Field="Name" HeaderText="Name" /> </DataGrid>
Here is a sample of the JSON data it is trying to bind to:
"certifications": [ { "id": 1, "certificationName": "WCLA" } ], "policies": [], "notes": "Steve Skaglund - Co-owner with Jeff. Steve's cell number is 360.631.3728", "foresters": [ { "id": 10, "firstName": "Kris", "lastName": "McCall", "abbreviation": "KM", "phoneNumbers": [], "emails": [] } ] }, { "id": 2, "limS_VendorId": "3b E", "name": "3B Excavators, LLC", "address1": "PO Box 12126", "address2": null, "city": "Salem", "state": "OR", "postalCode": "97302", "certificationRequired": true, "phones": [ { "id": 3, "phoneNum": "5033643821", "phoneType": 3 }, { "id": 4, "phoneNum": "(503) 362-1733", "phoneType": 1 } ], "insuranceContacts": [], "ein": "35-2331517", "stateNum": null, "ubiNum": "0", "workersCompNum": "6JUB-0G19574-4-16", "lAndINum": "0", "active": true, "professions": [ { "id": 8, "professionName": "Misc." } ], "certifications": [], "policies": [], "notes": "", "foresters": [ { "id": 12, "firstName": "Mark", "lastName": "Vroman", "abbreviation": "SMV", "phoneNumbers": [], "emails": [] } ] },
Hello,
Thank you for sharing the sample. Instead of having email communication I created a private case CAS-211828-Y3L2S3 to share the password and for further communication.
You can access this private case from your infragistics account at <https://ko.infragistics.com/my-account/support-activity>
Here's the password-protected zipped project. Please send me an email directly for the password at KenHaynes@HamptonLumber.com The file Contractors.json can be used to simulate the return from the call to the API for the grid.
Thank you for the update , though i do not have enough information to identify if the issue is in the application configuration or somewhere in the code.
We do support .net 5 also , you can verify that by changing the CLR in my application.
May be you can try isolating your sample , just have a grid with some column and bind with the dummy data and test if you can still reproduce the error or not. This will help you to narrow down the issue.
The best way for us to help you if you share your sample ,or modify mine which we can run and debug locally.
Regards,
Nope. That wasn't it. I made the change and got the same error.
I think I see the problem. In my Web Assembly project, I had
builder.Services.AddIgniteUIBlazor(typeof(DataGrid)); Instead of
builder.Services.AddIgniteUIBlazor(typeof(IIgniteUIBlazor));