I'm trying to display the content of a datatable in my wpf datagrid
In the following post:
Why can't I bind the WPFToolkit DataGrid ItemSource to DataTable?
I found the code:
myDataGrid.ItemsSource = myDataTable.DefaultView;
and the behaviour is strange: it shows n empty rows where the n is correct: the query results n rows!
So why can't I see them?
Without seeing the code, I would guess that you don't have AutoGenerateColumns
set to to true. That's fine, but if you aren't auto-generating columns, you need to manually add column definitions to your data grid.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With