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
190
How to remove comma and set min and max value
posted

 I am using Infragistics 14.1, in my case i would like use WebNumericEditor to input value without comma also set the max value to avoid large than int32.

I had reference the below link, change the Culture property, it is work about remove comma but no max value.

http://ko.infragistics.com/community/forums/t/21058.aspx

Is there any suggestion about this problem?

Thanks.

Regards,

KC

  • 10685
    Verified Answer
    Offline posted

    Hello KC Cheung, 

    It is possible to set MinValue as well as MaxValue for the numeric editor.

    For example here is an online sample, where the min and max are for a NumericEditor are specified by another two editors. In this sample by default the Editor limited by Range is loaded with a MinValue of 0 and MaxValue of 10. 

    You could set this property in Markup, CodeBehind as well as ClientSide:

    In Markup it could look like:
            <ig:WebNumericEditor ID="WebNumericEditor1" runat="server" MaxValue="10"></ig:WebNumericEditor> 

    In CodeBehind:
    WebNumericEditor1.MaxValue = 10; 

    It is also possible to set this maxValue using ClientSide. For example, handling Initialize client event:
    In order to set the needed properties in Client-Side you can use the built-in functions for the “WebNumericEditor” like this:

    function WebNumericEditor1_Initialize(sender, eventArgs){
    sender.set_minValue(5); // set min value
    sender.set_maxValue(20); // set max value
    } 

    What is more, you could find these properties under the official documentation - WebNumericEditor Class Members.