Telerik UWP DataForm changing bound data and Updating

178 views Asked by At

I'm currently using telerik in UWP to create list of items, i want to be able to use a browse button and update a certain piece of data in the Telerik-RadDataForm. I have all the bindings setup using MVVM and it displays data fine if it isn't edited on the code side. My XAML is setup as so:

  <Data:RadDataForm x:Name="dataform" 
    HorizontalAlignment="Left" Grid.Row="0" 
    Grid.RowSpan="2" Grid.Column="2" 
    VerticalAlignment="Center" Width="454" 
    Item="{Binding CurrentSceneViewModel, Mode=TwoWay, 
    UpdateSourceTrigger=PropertyChanged}"  CommitMode="Immediate"  
    ValidationMode="Immediate" Height="664" Margin="0,28"  />

The CurrentSceneViewModel is:

    public SceneViewModel CurrentSceneViewModel
    {
        get => _currentSceneViewModel;
        set=> _currentSceneViewModel= value;
    }

And the data i wish to change is :

    public string FileName
    {
        get => _fileName;
        set
        {
            Scene.SceneFile = value;
            _fileName = Path.GetFileName(value);
            OnPropertyChanged(nameof(FileName));

        }
    }

The problem i have is pushing this information to the user interface the code-behind doesn't seem to update the UI, even using PropertyChanged. I'm not sure what else to try ? And if this is something the RadDataform simply doesn't support. It should be noted FileName is a property of CurrentScene ViewModel.

public abstract class BaseViewModel: INotifyPropertyChanged
{
    public event PropertyChangedEventHandler PropertyChanged;
    protected void OnPropertyChanged(string propertyName)
    {
        PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
    }

    protected IPageNavigationService navservice = new PageNavigationService();
}
0

There are 0 answers