Home Forums WinForms controls Xceed Grid for WinForms TextEditor Context Menu Override

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #16566 |

    Is there a way to override the context menu on the TextEditor?  I have successfully generated a context menu for cells not in edit mode, but right clicking on a cell being edited results in both the custom and “Cut / Paste / etc.” context menu being displayed.

    Thanks,

    Richard

    Imported from legacy forums. Posted by Richard (had 709 views)

    User (Old forums)
    Member
    Post count: 23064

    It is not possible to do it with a WinTextBox (the default editor for a string column), but you can do it using a regular .NET TextBox.

    e.g.:

    ContextMenu contextMenu = new ContextMenu();

    //setup the contextMenu

    TextBox textBox = new TextBox();

    textBox.ContextMenu = contextMenu;

    gridControl1.Columns[

    “string column” ].CellEditorManager = new CellEditorManager( textBox, “Text”, true, true );

     

    Imported from legacy forums. Posted by André (had 936 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.