This is a migrated thread and some comments may be shown as answers.

Validation event not firing after Edit

3 Answers 51 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
Brad
Top achievements
Rank 1
Brad asked on 11 Jul 2008, 06:17 AM
Hi,

I was expecting the Validating or Validation event to fire after committing an edit of a node. Currently calling radTreeView BeginEdit() function to initiate editing and commit changes using Enter.

I need to validate the name and text of the edited tree node before accepting the change.  Is there something I need to enable for the event to fire?  Or should I be using a different event?

Regards,
Brad

3 Answers, 1 is accepted

Sort by
0
Accepted
Jordan
Telerik team
answered on 14 Jul 2008, 11:19 AM
Hi Brad,

The event that you are looking for is ValueValidating. Here is a code that examplifies its usage:
void radTreeView1_ValueValidating(object sender, CancelEventArgs e) 
        { 
            string value = this.radTreeView1.ActiveEditor.Value as string
            if (value.Contains("a")) 
            { 
                e.Cancel = true
            } 
        } 

Don't hesitate to contact us if you have further questions.

Sincerely yours,
Jordan
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Dragoljub
Top achievements
Rank 1
answered on 20 Mar 2009, 02:55 PM
Hi,

I have a question: Why don't you at least fix the documentation then?

http://www.telerik.com/help/winforms/tree_nodesediting.html

Let me give you a scenario how things happen:
1) something does not work as expected
2) consult documentation
3) test what documentation says
4) something still does not work
5) consult forum
6a) if you're lucky someone else had the same problem before you, in which case you get the solution
6b) otherwise, you ask the question in the forum, you get the answer a few days later (if it was Friday, then you get the answer on Tuesday/Wednesday next week)

Telerik, why do things need to be so complicated?
0
Jordan
Telerik team
answered on 23 Mar 2009, 03:18 PM
Hello Dragoljub,

Thank you for pointing this out. Your feedback is very valuable to us. Documentation has already been fixed, but the change will become visible in a couple of weeks. 

Best wishes,
Jordan
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
Treeview
Asked by
Brad
Top achievements
Rank 1
Answers by
Jordan
Telerik team
Dragoljub
Top achievements
Rank 1
Share this question
or