EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: peter on April 18, 2012, 06:12:18 AM



Title: Context menu
Post by: peter on April 18, 2012, 06:12:18 AM
I have bound a context menu to the lines in a list, and the context menu appears.
How do I know which line in the list was being used when the user selected the menu?

Thanks

Peter


Title: Re: Context menu
Post by: cmwalolo on April 19, 2012, 02:28:40 AM
Code:
        this.menu.menu({
            onClick: function (item) {
                var action = item.href.substr(1);
                var mi = null;
                onclick(action, id, self.items[action]);
            }
        });
The Item  should give you the item that you created for the menu. item.href will be typically, the action behind the item.