We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

DocumentSource Binding broken

Is it possible that the DocumentSource Binding is broken?
First time the binding works, but whenever the binded value changes, nothing happens with the EditControl.

Now I have to break my MVVM pattern to update the DocumentSource (or use LoadFile) from my ViewModel through code.
(+ I'm absolutely sure that the binded value works)

I'm using MVVMlight btw.

[DocumentSource="{Binding CurrentFileName, Converter={StaticResource SafeFileConverter}, ConverterParameter=Default.asm}"]
> After CurrentFileName changes, nothing happens (ValueConverter isn't called, DocumentSourceChanged event isn't called) [Only the first time these are called]

Am I missing something?



1 Reply

VR Vijayalakshmi Roopkumar Syncfusion Team September 22, 2017 01:39 AM UTC

 Hi Thomas,

Thank you for contacting Syncfusion Support.

We have checked the reported requirement with EditControl by binding the DocumentSource, but on changing it dynamically, the file get updated and DocumentSourceChanged event is called. We also observed that in the provided code you have not bind the DocumentSource in TwoWay mode, so we suspect that the binding would not occurred dynamically at your end. Please make use of the below code example:

Code Example:[C#] 
 
 
<syncfusion:EditControl Grid.Row="0" x:Name="EditControl" DocumentSource="{Binding FileName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" DocumentSourceChanged="EditControl_DocumentSourceChanged"/> 
 
 

We have also prepared the sample and video for your reference. Please download it from following location:

Sample: http://www.syncfusion.com/downloads/support/forum/132779/ze/EditControlbinding1723693955 

We also checking it in the MVVM light pattern, but in meanwhile please check the sample and let us know whether our understanding on the reported issue is same? Also let us know implement details in the MVVM light pattern and what you have done in the converter of your application. It would be helpful for us to proceed further on this.

Regards,
Vijayalakshmi V.R.
 


Loader.
Live Chat Icon For mobile
Up arrow icon