edit mode - MANY BUGS?

2 posts, 0 answers
  1. tomas
    tomas avatar
    139 posts
    Member since:
    Sep 2012

    Posted 08 Nov 2012 Link to this post

    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:

    if (this.isInEditMode != value)
                        this.isInEditMode = value;
                        if (this.HasErrors)
                            this.isInEditMode = true;

    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.

  2. Pavel R. Pavlov
    Pavel R. Pavlov avatar
    1165 posts

    Posted 13 Nov 2012 Link to this post

    Hi Tom,

    Let me make a quick clarification. The internal logic of the RadTreeView control does not support keeping the EditMode through property bindings. However, you can keep the edit mode through events. If you handle the EditCancled (it is fired when the edited item looses focus or the escape key is pressed) and the PreviewEdited (it is fired when you press the enter key) events, the ItemEditTemplate will remain applied to the RadTreeViewItem.

    Pavel R. Pavlov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft R3 2016 release webinar banner
Back to Top