I'm trying to hide specific rows from DataTable, but I'm only able to hide columns.
I found some solutions related to DataGridView, but it's not the same and didn't work for me.
In my xaml file I have :
<DataGrid Visibility="Visible" HorizontalAlignment="Stretch" Name="dataGrid_first" VerticalAlignment="Stretch" Width="Auto" Grid.Column="1" Grid.Row="2" >
</DataGrid>
To show data on it, I'm doing as follows:
dataGrid_first.ItemsSource = myDataTable.AsDataView();
And it's working. To hide columns, I'm doing something like this:
dataGrid_first.Columns[i].Visibility = Visibility.Hidden;
where 'i' is proper column number.
How can I hide a row?