question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Table Column nested class binding

See original GitHub issue

I have class that contain navigation properties of other class. When trying to bind property of child class I got exception.

Ex, by modifying official sample: public class MyChildClass { public string Name { get; set; } } public class WeatherForecast { public int Id { get; set; } public MyChildClass User { get; set; } } <Column @bind-Field=“@context.User.Name” Sortable /> will though exception.

Could you please help on this.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

7reactions
anranruyecommented, Mar 26, 2021

@BadarAljahwari @bodzilla try this:

@code{
    public class MyChildClass 
    { 
        public string Name { get; set; } 
    }
    public class WeatherForecast 
    { 
        public int Id { get; set; } 
        public MyChildClass User { get; set; } 
    }
}
<Table ...>
    <Column Title="UserName" Field="@context.User?.Name" DataIndex="User.Name" Sortable>@context.User?.Name</Column>
</Table>
1reaction
vadimffecommented, Jan 11, 2022

I am wondering, can you make some knowledge base somewhere? There are so much information to know, that is not on your official documentation website. The only way is to Google and find it from GitHub issues.

This is one very crucial thing and solution what @anranruye has provided would be good to have somewhere in knowledge base.

Read more comments on GitHub >

github_iconTop Results From Across the Web

JavaFX nested columns using nested object
The challenge is in setting the cell value factories for the nested columns. I do not want to use reflection to make the...
Read more >
C# WPF How to bind a nested class to nested datagrid in “ ...
How to bind data from nested classs to a nested datagrid? Why nested datagrid unable to read the class? what error i am...
Read more >
TableView nested columns binding with nested objects
is there a way to bind a TableView<Person> in order to have a column and nested column for the object Address ? /*...
Read more >
SAPUI5 - Table column property binding, nested object.
Hello everyone,. I am still trying to grasp the sap.ui.table columns binding and there is something that I don't know how can be...
Read more >
Binding a collection containing a nested list in Reporting
I want to bind the collection to a table and be able to show each field in the appropriate column. Unfortunately, it doesn't...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found