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
125
Close a usercontrol editor and prevent ultratexteditor from editing
posted
Hi, I have set up a grid to use a user control when a cell's drop down button is clicked. The control contains a button to close the control. When pressed this fires an event to the main form. I am trying to programatically close the control but can't get it to do it. I've tried various PerformAction options (including ClodeDropDown) but nothing has worked so far. Also, I want to prevent the ultratexteditor in the cell from being edited but the ReadOnly property doesn't do this. Is there a way? Sample project is attached. Thanks
grid uc test.zip
Parents
No Data
Reply
  • 37774
    posted

    Add the following code to your Editor_DoneEditing event handler:

    ((UltraTextEditor)this.ultraGrid1.ActiveCell.EditorControlResolved).CloseEditorButtonDropDowns();

    You may also want to check for the ActiveCell being null, just in case.  You can remove the call to the PerformAction(CloseDropDown), but you may want to leave the rest.

    -Matt

Children
No Data