I'm binding a datagrid to a DataView. I would like to hide the ID column when the data is displayed. The ID column needs to exist in the data as it is used in another part of my code.
The ID column is always the first (index 0) column.
Am I right in thinking that the DataContextChanged event doesn't guarantee that all columns have been refreshed?
How can I ensure that binding has finished before hiding the column? Ideally, I would like to hide it by its column name.
EDIT: Forgot to say that I can't specify the columns in XAML, as they are generated from dynamic SQL.