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
90
Value formatting in WebNumericEdit
posted

Hi,

I have a page with WebNumericEdit controls. Each control has different values (0,25 ... 0,345678952315 ... 1,05498 ... 400 ...)

I want that when the user enters the page, the values presented to him be with max of 4 decimal digits (in the example above  0,25 ... 0,3456 ... 1,0549 ... 400) and when he enters edit mode, the whole cell value be showed to him...

I try Viktor Snezhko's solution for WebNumericEdit embedded into grid. But it is unsuccessful: works function WebNumericEdit1_Initialize() only. There are no calls of the function RenderValue() in the creation of page and function getRenderedValue()  on client.

May be this solution work for embedded editors only?

May be exists any solution for simple WebNumericEdit ?

I am using NetAdvantage for .Net 2007 Volume 1 CLR 2. 

Parents
No Data
Reply
  • 24497
    posted

    Hi,

    Unfortunately that is not supported. The value displayed in editor (in focus or not-focus states) is defined by inputElement.value. That string value is used to build internal numeric value for get/setValue and for server. Value in editor may be modified not only by keyboard, but also by "special" events (like copy/paste by mouse drag of browser, copy/paste pop-up, etc). In general case WebTextEdit is not able to account and process all those special actions. So, to handle those changes, editor checkes input.value for any (including mouse over/out) browser event, and if for some reason value was modified, then editor adjusts its actual value.

    When editor is embedded in grid, then value displayed in grid-cell can be anything, and appearance of that value is not related to the input.value of editor.

Children
No Data