DataTable not binding to DataGrid in WPF MVVM : <p>Can't figure out why my DataGrid isn't populating when I fill it's binded DataTable. I've checked other Stackoverflow posts but nothing seems to solve my problem. I know that my DataTable is getting filled up because the row count is over 50. The method that fills the DataTable (ReturnOperators) is sucessfully getting called (It's when the SelectedItem in a listbox is changed)</p>

<p>Here is my code:</p>

<p>Xaml:</p>

<pre><code>                 &lt;DataGrid x:Name="dgOperators"
                        ItemsSource="{Binding DtOperators}"
                  AutoGenerateColumns="True"
                      Background="#0d0d0d"
                      Foreground="White"
                      Margin="10"
                     Grid.Row="1"
                  IsReadOnly="True" /&gt;
</code></pre>

<p>MainWindow.xaml.cs:</p>

<p>private ViewModel vm;</p>

<pre><code>    public MainWindow()
    {
        InitializeComponent();
        vm = new ViewModel();
        this.DataContext = vm;
    }
</code></pre>

<p>ViewModel:</p>

<pre><code>private DataTable dtOperators;

    public DataTable DtOperators
    {
        get { return dtOperators; }
        set
        {
            dtOperators = value;
            OnPropertyChanged("DtOperators");
        }
    }

    public void ReturnOperators()
    {

        string query = "My SQL Query Here";
        using (SqlConnection con = new SqlConnection(connectionString))
        using (SqlCommand cmd = new SqlCommand(query, con))
        using (SqlDataAdapter adapter = new SqlDataAdapter(cmd))
        {
            DtOperators.Clear();
            adapter.Fill(DtOperators);
        }
    }
</code></pre>
