Validations not showing inside ListView

Dec 11, 2014 at 3:44 PM
When I use validations on a TextBox in a plain grid, it works just fine:
<TextBox Grid.Row="0" Grid.Column="1" Height="28" Margin="3">
    <TextBox.ToolTip>
        <TextBlock MaxWidth="400" TextWrapping="Wrap"
               Text="..." />
    </TextBox.ToolTip>
    <TextBox.Text>
        <Binding Path="WindowsAdminUser" UpdateSourceTrigger="PropertyChanged" ValidatesOnDataErrors="True">
            <Binding.ValidationRules>
                <validationRules:RequiredField ErrorMessage="Windows admin user is required." />
            </Binding.ValidationRules>
        </Binding>
    </TextBox.Text>
</TextBox>
Image

However when I use the same pattern in a ListView I don't see any message displayed, though I can step through the validator, so I know it's being invoked.
<ListView ItemsSource="{Binding DatabaseInfos}" VerticalAlignment="Stretch" Margin="10">
    <ListView.View>
        <GridView>
            ...
            <GridViewColumn Header="SQL Server">
                <GridViewColumn.CellTemplate>
                    <DataTemplate>
                        <TextBox Width="130">
                            <TextBox.Text>
                                <Binding Path="Server" Mode="TwoWay" ValidatesOnDataErrors="True"
                                         UpdateSourceTrigger="PropertyChanged">
                                    <Binding.ValidationRules>
                                        <validationRules:RequiredField ErrorMessage="Required" />
                                    </Binding.ValidationRules
                                </Binding>       
                            </TextBox.Text>
                        </TextBox>
                    </DataTemplate>
                </GridViewColumn.CellTemplate>
            </GridViewColumn>
...
</ListView>
Image
Coordinator
Dec 13, 2014 at 11:09 AM
This is most likely because the default GridView style doesn't include a template for rendering validation errors. Somethings worth checking. Care to create an issue in the issue tracker?