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
2945
UltraTextEditor with dropdown
posted

I'm building a multi-select dropdown using an UltraTextEditor and an UltraGrid as my EditorButtonDropdown control.  All works pretty well, but I want my dropdown to have the behaviour of a DropDownList, i.e. no editing in the textbox.

I've set the ReadOnly property to True, but unfortunately I still have a cursor in the text box.

I also want the grid to dropdown whenever I click on the text box.  I can use the AfterEnterEditMode event to force a DropDown which works ok, however, when the control Closes Up, the textbox is still in Edit Mode, so I can't repeat the trick.

So, (1) is there a way to prevent the cursor?  I tried cancelling the control going into edit mode in the BeforeEnterEditMode event, however, this prevents me being able to dropdown the grid.

And (2), is there any way to programatically exit from Edit Mode?

Thanks,
Campbell 

Parents
  • 469350
    Verified Answer
    Offline posted
    Hi Campbell,

    jcwild said:
    So, (1) is there a way to prevent the cursor?  I tried cancelling the control going into edit mode in the BeforeEnterEditMode event, however, this prevents me being able to dropdown the grid.

     

    Well, the only thing I can think of is to set focus to the grid once it drops down. The TextBox can't show a cursor if it does not have focus. 

    jcwild said:
    And (2), is there any way to programatically exit from Edit Mode?

    I'm not sure. Is there an ExitEditMode method on the control? Maybe there's a PerformAction option for exiting edit mode? Or maybe you should just be dropping down in the click event instead of (or in addition to) EnterEditMode.  

     

     

Reply Children