Click here to Skip to main content
15,888,113 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Say I have the code.
<telerik:GridViewDataColumn Header="Contact">
    <telerik:GridViewDataColumn.CellTemplate>
         <DataTemplate>
               <TextBox Text="{Binding SomeText, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged}" />
         </DataTemplate>
   </telerik:GridViewDataColumn.CellTemplate>
</telerik:GridViewDataColumn>


The thing is the validation is not firing. However if I put the TextBox into StackPanel.
<telerik:GridViewDataColumn Header="Contact">
    <telerik:GridViewDataColumn.CellTemplate>
         <DataTemplate>
             <StackPanel>
               <TextBox Text="{Binding SomeText, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged}" />
             </StackPanel>
         </DataTemplate>
   </telerik:GridViewDataColumn.CellTemplate>
</telerik:GridViewDataColumn>


Then it works, I don't know why? Sorry for the silly question. I just want to understand the concept well.

What I have tried:

A StackPanel contains a collection of UIElement objects, which are in the Children property.
Posted
Comments
Bryian Tan 31-Aug-18 23:41pm    
The first option should work. I think it depends on the version, you should get a better confirmation from Telerik Developer Forums[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900