I've got a little problem with my application.
I get my data from a database and it is shown in a RadTreeView. When I edit an item a new RadWindow appears with all the data of the item inside, like Serialnumber, manufacturer...
I've implemented two buttons for saving and canceling the action.
Saving writes the data into my database and refreshes the TreeView.
It is not very nice looking, because the hole RadTreeView will be unloaded and loaded again, so i get my database key item_ID to save it again if new changes will be made.
Maybe you have a better way to do this.
But the big problem is my cancelation.
If the EditPage is loaded a create a new object with the DataContext of the selected item, for backup issues.
If i cancel editting i do following:
sender, RoutedEventArgs e)
.DataContext = editBackup;
So my database isn't involved but the RadTreeViewItem has the values before the canceling.
What is my mistake in this case?