How to bind WPF Datagrid to a joined table

给你一囗甜甜゛ 提交于 2019-12-02 00:51:10

The code that you presented seems ok - it doesn't matter how an object is created - what matters is the object itself.

Rather than showing us this, you should show the xaml.

One more thing - are we talking about DataGridView from winforms or rather the one that comes with WPF Toolkit ?

=======================================

Sorry. I've missed it in the first place - you don't have properties in your class! You've created public fields instead of properties and that's probably the problem.

The code should look like this:

 public class NeshtoSi
{
    public NeshtoSi() { }

    public string ssn{get; set;}
    public string name{get; set;}
    public string surname{get; set;}
}
Berryl

I went through this recently, and the answer is outlined in a post of mine that is here

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!