EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: aiit on June 26, 2019, 04:48:52 PM



Title: [SOLVED]How can I get field with datagrid onRowContextMenu
Post by: aiit on June 26, 2019, 04:48:52 PM
How can I get field with datagrid onRowContextMenu(e, index, row)
thanks


Title: Re: How can I get field with datagrid onRowContextMenu
Post by: stworthy on June 27, 2019, 07:15:54 AM
Please try this code to get the field name.
Code:
onRowContextMenu: function(e){
var td = $(e.target).closest('td[field]');
var field = td.attr('field');
console.log(field)
}


Title: Re: How can I get field with datagrid onRowContextMenu
Post by: aiit on June 27, 2019, 10:45:43 PM
Thank you very much Mr. stworthy.

Please try this code to get the field name.
Code:
onRowContextMenu: function(e){
var td = $(e.target).closest('td[field]');
var field = td.attr('field');
console.log(field)
}