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
490
How to Disable the UltraNumericEditor without disabling the StateEditorButton inside
posted

I've got a check box, a StateEditorButton, inside an UltraNumericEditor. The idea is to block input to the UltraNumericEditor when the checkbox is checked out.

I do that with the AfterCheckStateChanged event.

The problem is when I disable the UltraNumericEditor, the StateEditorButton gets also disabled. In that case, the user can't enable it again by checking in the checkbox.

What's the best solution to this scenario?

Shall I remove the StateEditorButton from the buttons collection of the UltraNumericEditor and implement it independently?

Parents
No Data
Reply
  • 23930
    Offline posted

    Hi Burak,

    Thank you for posting in our forums.

    Yes disabling the UltraNumericEditor, will cause all its UIElements to get the disabled as well, including the checkbox. So one option would be to add a separate checkbox to the form and use it for enabling/disabling the input. Another option would be to use the CreationFilter interface to add a CheckBoxUIElement to the editor area. Then handle the BeforeEnterEditMode event of the UltraNumericEditor and cancel it based on whether or not the CheckBoxUIElement is checked. You will also need to exit and enter edit mode whenever the CheckBoxUIElement’s check state is changed. For more information on the CreationFilter interface, please visit this link:

    http://help.infragistics.com/Help/Doc/WinForms/2012.2/CLR4.0/HTML/Win_Creation_Filter.html

    I have attached a sample demonstrating the Creation Filter approach.

    Please let me know if you have any additional questions.

    WNE_ClickDisabledCheckbox.zip
Children