cascading menu on each row when right-clicked

cascading menu on each row when right-clicked

DTFanDTFan Posts: 2Questions: 0Answers: 0
edited September 2011 in General
Hi Allan,

Is there any plug-ins that I can use to show menu option (cascading menu) on each dataTables row when right-clicked on it ?

Regards,

DTFan

Replies

  • neburtonneburton Posts: 63Questions: 6Answers: 0
    If you mean a context menu, then we use a context menu jquery plugin - http://abeautifulsite.net/blog/2008/09/jquery-context-menu-plugin/

    You can easily apply this to each row as it's drawn using the fnRowCallback function.

    In our scenario, our datatable is sourced via a json data feed. If your first column contained your unique id for example, you could extract this and use it with the context menu to open a dialog with data relevant to that row etc...
  • GregPGregP Posts: 500Questions: 10Answers: 0
    You could theoretically delegate an event to each row that builds the menu on-demand and then calls the context menu function on it. It would work similarly to what's done in the drill-down-rows example.
  • DTFanDTFan Posts: 2Questions: 0Answers: 0
    Thanks neburton & GregP for sharing your thoughts. I'll give it a go. Thanks again.
This discussion has been closed.