This question is locked. New answers and comments are not allowed.
Hello
Im not sure where to place this, so here we go.
I have a RadGridView which ItemsSource is set to the PagedSource of a RadDataPager which Source is set to an ObservableCollection in my viewmodel. One of the columns in the gridview contains a readonly RadRichTextBox and a HtmlDataProvider as a rich textbox resource which is bound to a string property containing Html. All this is working as intended, and when I update my observable collection the gridview displays the correct items and the richtextboxes correctly displays the formated text for each row.
My problem is, that when change the page using the datapager, all the columns are updated with the next set of items EXCEPT the richtextboxes column, which all stays the same.
Below is the xaml for the gridview, circhtextbox column and datapager. My codebehind contains nothing but the InitializeComponents() method-call.
What is the problem? Why is the content of the RadRichTextBox'es not updated when the page is changed?
Im not sure where to place this, so here we go.
I have a RadGridView which ItemsSource is set to the PagedSource of a RadDataPager which Source is set to an ObservableCollection in my viewmodel. One of the columns in the gridview contains a readonly RadRichTextBox and a HtmlDataProvider as a rich textbox resource which is bound to a string property containing Html. All this is working as intended, and when I update my observable collection the gridview displays the correct items and the richtextboxes correctly displays the formated text for each row.
My problem is, that when change the page using the datapager, all the columns are updated with the next set of items EXCEPT the richtextboxes column, which all stays the same.
Below is the xaml for the gridview, circhtextbox column and datapager. My codebehind contains nothing but the InitializeComponents() method-call.
<telerik:RadGridView Name="SearchResultGridView" ShowGroupPanel="False" IsFilteringAllowed="False" IsReadOnly="True" CanUserSortColumns="False" CanUserResizeColumns="False" CanUserReorderColumns="False" AutoGenerateColumns="False" CanUserSelect="False" ItemsSource="{Binding Path=PagedSource, ElementName=SearchResultDataPager}" Margin="20,10,20,0"> <telerik:RadGridView.Columns> <telerik:GridViewDataColumn Header="Id" DataMemberBinding="{Binding LabelId}" /> <telerik:GridViewDataColumn Header="Name" TextWrapping="Wrap" DataMemberBinding="{Binding Label.LabelName}" /> <telerik:GridViewDataColumn Header="Comment" TextWrapping="Wrap" DataMemberBinding="{Binding Label.Comment}" /> <telerik:GridViewDataColumn Header="Text" Width="*" DataMemberBinding="{Binding LabelText, Mode=TwoWay}"> <telerik:GridViewColumn.CellTemplate> <DataTemplate> <telerik:RadRichTextBox x:Name="LabelTextRichTextBox" IsHitTestVisible="False" IsReadOnly="True" Margin="3"> <telerik:RadRichTextBox.Resources> <telerikHtml:HtmlDataProvider x:Key="HtmlDataProvider" RichTextBox="{Binding ElementName=LabelTextRichTextBox}" Html="{Binding LabelText, Mode=TwoWay}" /> </telerik:RadRichTextBox.Resources> </telerik:RadRichTextBox> </DataTemplate> </telerik:GridViewColumn.CellTemplate> </telerik:GridViewDataColumn> <telerik:GridViewDataColumn Header="Locale" DataMemberBinding="{Binding Locale.LocaleName}" /> <telerik:GridViewColumn> <telerik:GridViewColumn.CellTemplate> <DataTemplate> <Button Content="Edit" Command="{Binding Source={StaticResource DataContextProxy}, Path=DataSource.EditLabelCommand}" CommandParameter="{Binding}" Margin="2" Width="35" /> </DataTemplate> </telerik:GridViewColumn.CellTemplate> </telerik:GridViewColumn> </telerik:RadGridView.Columns></telerik:RadGridView><telerikData:RadDataPager x:Name="SearchResultDataPager" Source="{Binding Path=SearchResult}" PageSize="1" IsTotalItemCountFixed="True" Margin="20,2,20,10" />What is the problem? Why is the content of the RadRichTextBox'es not updated when the page is changed?