I cannot bind the Visible property of the WPF datagridtextcolumn to a boolean value.
My binding expression is,
{Binding Path=DataContext.IsThisColumn
Hard to say from so little of your code. What is in Visual Studio's Output window (under Debug)? That will often give you a clue as to the problem.
I worked this out.
DataGridCOlumn is not a framework element so the FindAncestor call was failing (DataGridColumn not part of visual tree)
Have to set source property of binding expression to a staticresource and it works fine.
If you can bind from code you can use
BindingOperations.SetBinding(DatagridColumInstance,
DatagridColum.VisibilityProperty,
myNewBindDef);
I was looking for the same thing and found an execellent way to do it in an article about forwarding datacontext to columns.