Docs
API
  • contextmenu

    Array

    Context menu is special widget with items to run grid actions.
    There are 2 ways to enable context menu:
    1 - To use event contextmenu
    and than generate custom menu.
    2 - To use property contextmenu.
    Before continue it is recomended to learn doc link Menu.
    Property contextmenu is array of predefined and custom items.

    List of predefined items

    copy

    String

    Copy selected cells to clipboard.
    Alternatively it is possible to use CTRL+C.

    copy+

    String

    Copy selected cells and columns' titles to clipboard.

    delete

    String

    Delete selected rows.

    export

    String

    Contains sub menu with actions: export to Excel and CSV.

    -

    String

    Separator.

    Sample:

    
    contextmenu: [
      'copy',
      'copy+',
      '-',
      'delete',
      '-',
      'export'
    ]
    

    Custom item

    To add custom item, it requires to read doc link Menu first.

    Sample:

    
    .custom-menu-item-cls {
      background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns...");
      background-position-x: 3px;
      background-position-y: 3px;
    }
    
    .fancy-menu-item-active .custom-menu-item-cls {
      background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns...");
    }
    
    contextmenu: [
      'copy',
      'copy+',
      '-',
      'delete',
      '-',
      'export',
      '-',
      {
    	text: 'Custom',
    	imageCls: 'custom-menu-item-cls',
    	sideText: 'CUSTOM',
    	handler: function(){
    	  alert('Click on custom item');
    	}
      }
    ],
    

    Default

    
    undefined