ValidationBinding - DataGrid

Jan 5, 2009 at 5:11 PM
Edited Jan 5, 2009 at 5:13 PM

I'm trying to use the Standalone ValidationApplicationBlock ValidationBinding by Daniel Cazzulino, to bind data to a DataGridTemplateColumn of the WPF Toolkit DataGrid CTP. The ValidationBinding works fine if not used within a DataGrid, and a normal Binding works fine in the DataGrid. But using the ValidationBinding within a DataGrid displays just empty cells, not complaining about any binding errors.

I found that in ValidationBinding.cs, around line 49

  expression = binding.ProvideValue(serviceProvider) as BindingExpression;

expression is null, meaning no binding takes place. Any idea how to fix this?

Thanks a lot.

some xaml:

                    <grid:DataGridTextColumn Binding="{v:ValidationBinding Path=ID}"  Header="ID"/>

                    <grid:DataGridTemplateColumn Header="ID">
                                <TextBox Text="{v:ValidationBinding Path=ID}" Margin="0" Padding="0" BorderThickness="0"/>
                                <TextBlock Text="{v:ValidationBinding Path=ID}"/>

Jan 6, 2009 at 9:08 AM
Found something. Try: