This question is locked. New answers and comments are not allowed.
Hi Telerik,
Please try this:
Create collection of objects with two required properties and parentchild hierarchy.
Add 3rd property - IsInEditMode. Bind that property to your object MODE = TWOWAY. Create datatemplates with a form and 2 textboxes to update object properties.
Start an edit of one node. Your form with two textboxes should be visible. Click somewhere in the form but not in the textboxes.
Your setter for the IsInEditMode should look like this:
When there are some validation errors, you will get not edited node (treeview item) but IsInEditMode will have a value = true.
I cannot post my solution because it is too big, but you can simulate this easily.
Another bug is that the previewEdited event can NOTbe canceled. Edit mode is always terminated.
Thank you.
Tom
Please try this:
Create collection of objects with two required properties and parentchild hierarchy.
Add 3rd property - IsInEditMode. Bind that property to your object MODE = TWOWAY. Create datatemplates with a form and 2 textboxes to update object properties.
Start an edit of one node. Your form with two textboxes should be visible. Click somewhere in the form but not in the textboxes.
Your setter for the IsInEditMode should look like this:
if
(
this
.isInEditMode != value)
{
this
.isInEditMode = value;
if
(
this
.HasErrors)
this
.isInEditMode =
true
;
this
.NotifyPropertyChanged(
"IsInEditMode"
);
}
When there are some validation errors, you will get not edited node (treeview item) but IsInEditMode will have a value = true.
I cannot post my solution because it is too big, but you can simulate this easily.
Another bug is that the previewEdited event can NOTbe canceled. Edit mode is always terminated.
Thank you.
Tom