Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1015
Cancel TextChanging
posted

Hello,

I tried to use the TextChanging client event to test the new node name.

<ClientEvents NodeEditingTextChanging="Node_TextChanging" />
I test the new name and cancel the event. The new text is used anyways.
 function Node_TextChanging(tree, eventArgs) {
            if (!TestIsNewName(tree, eventArgs.getNewText())) {
                eventArgs.set_cancel();
                alert('<%= this.GetGlobalResourceObject("MessageTexts","LblError"%>');
               
            } 
        }
Am I doing something wrong here? Or did I missunderstood the set_cancel() methode?
Thanks Uli
 
Parents
No Data
Reply
  • 1015
    Verified Answer
    Offline posted

    Sorry, It seems that I can't delete my question? I found my mistake. It should be: eventArgs.set_cancel(true); I have overlooked the bool parameter.

Children
No Data