I have list of columns for grid specified in a table 'Controls' containing the column_name & column_caption and a SRNO with some other extra details which is not necessary here.
public IEnumerable
List
@foreach (var column in datagrid)
{
}
This is the code i used for displaying the grid. But the grid is not getting displayed & getting error.
Error is : ArgumentException: Cannot detect the member of System.Collections.Generic.Dictionary`2[System.String,System.Object] (Parameter 'LOC')
Note: LOC is one of the column_name
The issue might be because of dictionary usage.
please help me with any suggestions to make this code work.
Amit MohantyPosted Feb 21, 2024, 11:55 AM
The issue you're facing might be due to the way you are trying to bind dynamic data structures like dictionaries to strongly typed components. When you specify TItem="Dictionary", the compiler tries to infer properties from Dictionary, which is not a strongly typed class with predefined properties.
So you need to provide a strongly typed class or structure that Blazorise DataGrid can use to infer the properties.
Dhanya NithinPosted Feb 21, 2024, 11:16 AM
This is what i have already done & giving the same error as i posted before
Jithu ThomasPosted Feb 21, 2024, 11:02 AM
try this code snippet.