This is a migrated thread and some comments may be shown as answers.

Binding doesnt work

1 Answer 75 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Jiri
Top achievements
Rank 1
Jiri asked on 02 Jun 2015, 02:36 PM

Hi, I have a problem probably with binding - when I try load something from database - everything works fine, but when I try save something to database - property is null

Detail.PoznamkaMax is ViewModel property - data from database

<telerik:RtfDataProvider x:Name="rtfDataProvider"
           Rtf="{Binding ElementName=poznamka, Path=Text, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
          RichTextBox="{Binding ElementName=editor}"
                                 />
<risCtrl:RadTextInput x:Name="poznamka" Margin="0 100 0 0" Text="{Binding Path=Detail.PoznamkaMax,Mode=TwoWay,
                                            ValidatesOnExceptions=False, NotifyOnValidationError=True}" />
             
            <telerik:RadRichTextBox x:Name="editor" Grid.Row="1" Grid.Column="0"
                                    DocumentContentChanged="editor_DocumentContentChanged"
                                    Margin="0 4 0 0"
                />

1 Answer, 1 is accepted

Sort by
0
Tanya
Telerik team
answered on 04 Jun 2015, 04:11 PM
Hello Jiri,

We are not familiar with a control with the name RadTextInput and I not sure what exactly it is.

In general, the data provider should be bound to the content of the RadRichTextBox through the view model and the UpdateSourceTrigger property should be set directly to the provider and not to the binding. We have an SDK example showing how to bind RadRichTextBox, you could check it on GitHub.

If this is not helpful, it will be great if you could share the view model, which is used for the binding and explain what RadTextInput represents.

Regards,
Tanya
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
RichTextBox
Asked by
Jiri
Top achievements
Rank 1
Answers by
Tanya
Telerik team
Share this question
or