GridView V2014.1.0428.45
So I have the following GridViewDataColumn. Everything was working fine with the editing binding until I added the DataMemberBinding to the GridViewDataColumn header to facilitate sorting.
<telerikGrid:GridViewDataColumn IsReadOnly="{Binding Data.IsReadOnly, Source={StaticResource bindingProxy}}"
Header="Public Domain" HeaderCellStyle="{StaticResource GridViewHeaderCellStyle}" Width="100"
DataMemberBinding="{Binding PublicDomain}">
<telerikGrid:GridViewDataColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding PublicDomain}" />
</DataTemplate>
</telerikGrid:GridViewDataColumn.CellTemplate>
<telerikGrid:GridViewDataColumn.CellEditTemplate>
<DataTemplate>
<TextBox Text="{Binding PublicDomain, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
PreviewTextInput="PublicDomainTextBox_PreviewTextInput" />
</DataTemplate>
</telerikGrid:GridViewDataColumn.CellEditTemplate>
</telerikGrid:GridViewDataColumn>
Once I added the DataMemberBinding to the ColumnHeader, now when I navigate out of this cell on the Grid, I get an additional set to PublicDomain that sets it back to null, no matter what the user has typed into the TextBox. I've verified that taking out the DataMemberBinding returns things to working.
My understanding was that adding that DataMemberBinding shouldn't change the behavior of the CellEditTemplate. Is there something else that's been done wrong here that could be causing the binding to not work properly once DataMemberBinding is set?
Thanks.
So I have the following GridViewDataColumn. Everything was working fine with the editing binding until I added the DataMemberBinding to the GridViewDataColumn header to facilitate sorting.
<telerikGrid:GridViewDataColumn IsReadOnly="{Binding Data.IsReadOnly, Source={StaticResource bindingProxy}}"
Header="Public Domain" HeaderCellStyle="{StaticResource GridViewHeaderCellStyle}" Width="100"
DataMemberBinding="{Binding PublicDomain}">
<telerikGrid:GridViewDataColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding PublicDomain}" />
</DataTemplate>
</telerikGrid:GridViewDataColumn.CellTemplate>
<telerikGrid:GridViewDataColumn.CellEditTemplate>
<DataTemplate>
<TextBox Text="{Binding PublicDomain, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
PreviewTextInput="PublicDomainTextBox_PreviewTextInput" />
</DataTemplate>
</telerikGrid:GridViewDataColumn.CellEditTemplate>
</telerikGrid:GridViewDataColumn>
Once I added the DataMemberBinding to the ColumnHeader, now when I navigate out of this cell on the Grid, I get an additional set to PublicDomain that sets it back to null, no matter what the user has typed into the TextBox. I've verified that taking out the DataMemberBinding returns things to working.
My understanding was that adding that DataMemberBinding shouldn't change the behavior of the CellEditTemplate. Is there something else that's been done wrong here that could be causing the binding to not work properly once DataMemberBinding is set?
Thanks.