sonaku2003
asked on
How to create a context menu based on the row selection in JavaScript
I am having some difficulties in creating a contextmenu in Javascript..
I need a context menu to be displayed based on the row selection in a grid.. Some rows have defaultt values that need to be displayed and some dont...
So I need a javascript that iterate through all the rows selected and then take their values and display the context menu accordingly...
Can anyone help me in this regard?
I need a context menu to be displayed based on the row selection in a grid.. Some rows have defaultt values that need to be displayed and some dont...
So I need a javascript that iterate through all the rows selected and then take their values and display the context menu accordingly...
Can anyone help me in this regard?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
<$.02>Don't forget to "unattach" the event handlers (to prevent memory leaks)</$.02>
ASKER
Gosp1,
Thanks for your reply
Your approach works fine... But I need something like this.... I have a grid, each and every row in it has some hidden values that are to be displayed in the context menu...
For instance Row1 has "print, cut, copy"
Row2 has "open,download"
Upon the selection of rows, javascript has to iterate through all the selected rows , and take those values and create a context menu dynamically.. Sometimes user may select mutple rows too...
Can you help me in this...
Thanks for your reply
Your approach works fine... But I need something like this.... I have a grid, each and every row in it has some hidden values that are to be displayed in the context menu...
For instance Row1 has "print, cut, copy"
Row2 has "open,download"
Upon the selection of rows, javascript has to iterate through all the selected rows , and take those values and create a context menu dynamically.. Sometimes user may select mutple rows too...
Can you help me in this...