开发者

ValueChanging event on Infragistics WebDataGrid

开发者 https://www.devze.com 2023-04-10 14:04 出处:网络
Does anyone have an idea why this doesn\'t work or a workaround? I\'m trying to use the ValueChanging event from inside an EditorProvider

Does anyone have an idea why this doesn't work or a workaround?

I'm trying to 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);
    }
}
开发者_StackOverflow

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?


From this post on the Infragistics forums I believe that you have a numeric column. If this is the case then you should use a NumbericEditorProvider instead. There are more details on the available editor provides in the Infragistics help:

http://help.infragistics.com/NetAdvantage/ASPNET/2011.1?page=WebDataGrid_Editor_Providers.html

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号