Custom Subeditor leaves Cell editable

Posted by: trollpower on 8 September 2017, 2:38 pm EST

  • Posted 8 September 2017, 2:38 pm EST

    Hello,

    I have implemented the ISubEditor Interface. The subeditor is shown successfully on clicking on the DropDownButton, doubleclicking and F4 as well. Since the subeditor should be the only way for the user to enter data, I need a way to prevent the cell to become editable by user input other than F4, doubleclick or a click on the dropdownbutton. The properties Readonly and Static also prevents the subeditor to become visible, since the doubleclick, F4 or dropdownbutton is prevented from user action as well.

    So can someone give me a clue on how to prevent specific user input in the cell other than the ones that open the subeditor?

    Thanks in advance

  • Replied 8 September 2017, 2:38 pm EST

    Hello,

    Implementing  ISubEditor means you are
    creating a custom editor which can be applied to any CellType. Different CellTypes would have different approaches to
    implement the behavior that you are looking for.

    For ex:- using a GeneralCellType or any CellType derived from the GeneralCellType then you should set the ControlType property to ButtonEdit when
    assigning the editor to the Spread Cell to get the behavior you are
    looking for wherein your cell will then be editable only using DoubleClicking the cell, pressing F4 key or by clicking on the dropdown button. Hence I would like to know on which CellType you are setting the SubEditor.

    Thanks.

  • Replied 8 September 2017, 2:38 pm EST

    Hi Reeva,

    first of all thanks for your reply.

    I need to display the result of the SubEditor in the cell the subeditor is attached to. The result is basically plain text, but the text must be readonly. At the moment I use a TextCellType. There doesn't seem to be a property "ControlType" in any of the cell types, so how can i change the control type?

    Is this the information you need?

     

    Best regards

     

  • Replied 8 September 2017, 2:38 pm EST

    Hello,

    Thanks for the clarification. Please have a look at the attached sample wherein the cell will only interact through subeditor on double clicking the cell, pressing F4 or on clicking dropdown and would not allow the
    user interaction directly in the cell by typing.

    Hope it will help you. Thanks.


    2011/05/case1-subeditor.zip
  • Replied 8 September 2017, 2:38 pm EST

    Hello Reeva,

     thank you very much for your reply. Your sample seems to do the trick. :)

    Thanks again and best regards

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels