EasyUI Forum
September 14, 2025, 06:12:46 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Update Context Menu per row [Resolved]  (Read 7397 times)
dies_felices
Newbie
*
Posts: 24


View Profile
« on: August 18, 2015, 06:37:46 AM »

Hi,

I'm trying to change the Text on a context menu depending upon which row you click on.  There seem to be two ways to achieve this, neither of which I am able to correctly run.

The first using the set text method on the menu:

     http://jsfiddle.net/3L4ej4dx/100/

As the menu items are created dynamically, I am unable to find them by name or id.


The alternative method is to destroy the original menu once it's been shown and create a new one each time the menu is triggered:

    http://jsfiddle.net/3L4ej4dx/99/

This throws an error

jquery.easyui.min.js:5453 Uncaught TypeError: Cannot read property 'options' of undefined


Any suggestions, ideas, insightful knowledgeable answers will all be gratefully received.  Thank you.
« Last Edit: August 18, 2015, 08:13:28 AM by dies_felices » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: August 18, 2015, 07:16:17 AM »

Please try this example http://jsfiddle.net/3L4ej4dx/101/
Logged
dies_felices
Newbie
*
Posts: 24


View Profile
« Reply #2 on: August 18, 2015, 08:13:06 AM »

Thank you, that has worked splendidly.  Smiley

Awesome!!!
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!