EasyUI Forum
May 18, 2024, 09:50:54 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: context-menu in datagrid  (Read 5395 times)
amir-t
Newbie
*
Posts: 48


View Profile
« on: December 06, 2015, 02:55:02 AM »

hey,

I need to activate the context-menu when right-click on the empty area in the datagrid (not on a selected row).
someone have a suggestion on how to do it?

Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: December 06, 2015, 09:56:47 PM »

Please try this:
Code:
$('#dg').datagrid(
    onRowContextMenu: function(e,index,row){
    if (index>=0){
    console.log('click on rows')
    } else {
    console.log('click out of rows');
    }
    }
)
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!