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
104
Masked Editor for "File Size" display.
posted

I am looking for a masked editor that takes numeric values when it has focus, and should display human readable "File Size" when focus leaves the control. eg value 11111 should display 10.85KB when focus moves out of the editor.

Can anyone suggest me which Infragistics editor can help me achieve this? And, the properties I need to set for that particular control?

Sorry for being too vague about the requirement. 

Thanks in Advance!

Vishal.

Parents
  • 69832
    Verified Answer
    Offline posted

    You could use the IEditorDataFilter interface to format the value in the manner you describe here when the control is not focused, by dividing the actual value by 1024 and appending a suffix like "Kb". There is a knowledge base article that demonstrates the basic approach.

    You could use an UltraNumericEditor control for this, although I would think since file sizes cannot be changed directly, you would not want to allow editing. If editing is in fact disallowed, there would be no point in using that control, you would be better off using an UltraTextEditor (i.e., no masking).

Reply Children