JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › Data Grid › Blazor data grid not showing data › Reply To: Blazor data grid not showing data
Hi,
I’m having a similar issue and probably doing something stupid but whatever I do the grid always shows “No rows” and doesn’t issue any errors. My code follows the pattern above – I’ve tried using my own “Thing” object and a generic object but with no difference. My grid is initial empty on start up, and gets populated as the output of user initiated process.
<Grid @ref=”cdfGrid1″ DataSource=”dsColourDifference” Appearance=@appearance>
<Columns>
<Column DataField=”illuminant” Label=”Illuminant”></Column>
…
<Column Visible=@HunterLab DataField=”HunterLab” Label=”HunterLab”></Column>
<Column DataField=”Status” Label=”Status”></Column>
</Columns>
</Grid>
private List<object> dsColourDifference = new List<object>();
private Grid cdfGrid1;
dsColourDifference = new List<object>() {
new {
illuminant = cdf.illuminant,
…
status =cdf.status,
HunterLab = cdf.HunterLab
}
};
}
cdfGrid1.StateHasChanged();
Just to re-iterate: I also tried using an object (say “Thing”) with the listed properties, get and set, and using “new Thing {” instead of “new {” without any difference.