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
215
ValueChanging event
posted

How do you use the ValueChanging event from inside an EditorProvider

I have defined an EditProvider

                        <ig:TextEditorProvider ID="tepPercent">

                            <EditorControl HorizontalAlign="Right" ClientEvents-ValueChanging="validatePercent4Decimals"></EditorControl>

                        </ig:TextEditorProvider>

 

And a javascript handler

            function validatePercent4Decimals(sender, args) {

                var oldfieldvalue = args.get_oldValue();

                var newfieldvalue = args.get_value();

                if (isNaN(newfieldvalue)) {

                    args.set_value(oldfieldvalue);

                    args.set_cancel(true);

                }

            }

 

I've debugged it and can see it is running, and if I enter 34r, the inNan tests true and the set_value and set_cancel are called. But the value on the grid does not change from the 34r...

 

What's going on?

Parents Reply Children