Finding Radzen Blazor Components are going to help me for internal projects.
Below I am listing an issue that I am having but not finding an example to use to see about correcting the issue. I have googled, youtube, and read forms on websites and I am still having the issue.
Issue: Radzen Data Grid is displaying DataAccessLibrary per record found instead of the actual record
Goal: is to have the Found record(s) display in the Data Grid
Using Visual Studio 2019
Installed Radzen Blazor Components
Connected to an Existing SQL server for a defined database
Using Radzen Tabs with Radzen Data Grid
The Tabs work, and the header on the Data Grid work as well. As seen in the screen capture, it is listting DataAccessLibrary for the 1 record (If there are more than 1 record it just repeats that is being shown).
The provided code looks correct and should have worked. What happens when you debug the OnLoadContacts method? Does it return the expected data? Does it work if you delete the LoadData handler and set vendorContacts in the OnInitializedAsync method of your page instead? Also do you know what "DataAccessLibrary" could be? It can't come from nowhere.
THANKS for the formatting. (Sorry if I call things wrong! Still learning c#
DataAccessLibrary is a project within a Solution (VS2019) that I am working with at this time. It contains, the access to the server/Database which I know is MS SQL, also, a Copy of the Classes/Models of the records that are being found in the Database tables used in the 2nd project of the solution. The Methods to get the data as well (eq: GetVendorsList() .) The 2nd project of the solution has a reference to DataAccessLibrary and @Using DataAccessLibrary is being included with each Blazor razor page that is being created. As Example VendorContact class/model is defined in this library.
What I have done so far:
Removed the LoadData from the RadzenGrid line and I get a compile error until I put it back in.
Originally, the vendorContacts, which is a List of VendorContact, was being loaded in the OnInitializedAsync() method, but was being returned Null for the data in debug when the example that I was had 1 record, with a second example returned Null and it had 2 records. The record counts are from MS SQL query (select count(*) from VendorContact where VendorID = 1 ) of the table. Was thinking of a possible double read/get issue. As I moved it outside of the OnInitializedAsync() method to it's own and stepped through with debug the page that was rendering, I was getting record(s) being returned. But the record(s) were not displaying.