This question is locked. New answers and comments are not allowed.
Hello,
I go through your documents and online samples, but didn't find any DataForm sample with MVVM pattern, I m trying to following code for same, but it not able to add new item and it not synchronising with grid view. can u provide a sample code for this ? thanks in advance
public ObservableCollection<Employee> SofiaCarRentalDomainContextCollection{ get { return _productionDataCollection; } set { _productionDataCollection = value; RaisePropertyChanged("SofiaCarRentalDomainContextCollection"); EnableCommands(); }}
<telerik:RadGridView x:Name="RadGridView1" ItemsSource="{Binding SofiaCarRentalDomainContextCollection}" MinHeight="100" MaxHeight="500" Width="600" Height="200" CanUserFreezeColumns="False" RowIndicatorVisibility="Collapsed" /> <telerik:RadDataForm AutoCommit="True" Width="600" x:Name="myRadDataForm" ItemsSource="{Binding SofiaCarRentalDomainContextCollection}" Header="Employee Details" Grid.Row="1" AutoGeneratingField="myRadDataForm_AutoGeneratingField"> <i:Interaction.Triggers> <i:EventTrigger EventName="AddedNewItem"> <E2C:EventToCommand Command="{Binding AddNewCommand}" PassEventArgsToCommand="True"></E2C:EventToCommand> </i:EventTrigger> <i:EventTrigger EventName="EditEnded"> <E2C:EventToCommand Command="{Binding SaveCommand}" PassEventArgsToCommand="True"></E2C:EventToCommand> </i:EventTrigger> </i:Interaction.Triggers> </telerik:RadDataForm>