[CLOSED] How to change default behaviour of Number Field

  1. #1

    [CLOSED] How to change default behaviour of Number Field


    I have a large number of grid panels in my application most of which have NumberColumns with NumberFields as editors. At the moment I'm setting MouseWheelEnabled to false and HideTrigger to true on all of them.

    There must be a way to make these the default for the Project?

    Many thanks

    Last edited by Daniil; Oct 06, 2015 at 11:26 AM. Reason: [CLOSED]
  2. #2
    Hello Jeff,

    I don't see a way to set it globally for all the project, but there is a way to set it globally for a page by adding this JavaScript into the page's <head>.
        mouseWheelEnabled: false,
        hideTrigger: true
    Another approach could be implementing a custom control inheriting from NumberField and setting up required values and then use that custom control instead of an original NumberField.
  3. #3
    Thanks Daniil

    In fact I have a JavaScript file which I include in my Layout file:

    <script type="text/javascript" src="@Url.Content("/Scripts/utilities.js")"></script>
    so it's included in all Views which use that Layout file.

    It seems that if I put the override in utilities.js it effects all Views. Job done!

    Any reason why that wouldn't work?

    I appreciate though a custom control would be neater. Maybe I'll try that for experience.


  4. #4
    Any reason why that wouldn't work?
    I don't quite see any.

Similar Threads

  1. [CLOSED] [2.1] From panel field's width incorrect behaviour
    By Leonid_Veriga in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Sep 04, 2012, 12:25 PM
  2. Replies: 0
    Last Post: Apr 28, 2012, 9:16 PM
  3. [CLOSED] Number Field
    By Vasudhaika in forum 1.x Legacy Premium Help
    Replies: 19
    Last Post: Jul 19, 2011, 8:59 AM
  4. [1.0] Bug or change in enter key behaviour
    By plykkegaard in forum Bugs
    Replies: 3
    Last Post: Feb 15, 2011, 8:29 AM
  5. Number Field
    By fabiomarcos in forum 1.x Help
    Replies: 2
    Last Post: Jan 20, 2009, 11:29 AM

Tags for this Thread

Posting Permissions