I'm using ExcelDataReader to load the data into an DataSet
, which will be eventually be loaded into an DataGrid
in WPF. I have specific columns with headers as SLNO
and FY
which I don't want to include. How can I ignore those columns using FilterColumn
mentioned here?
You could handle the AutoGeneratingColumn
event:
private void DataGrid_AutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e)
{
e.Cancel = e.PropertyName == "SLNO" || e.PropertyName == "FY";
}