• PopupMenu - add server side onclick event

    By Slobodan (Steve) Lohja 1 decade ago

    I'm using the PopupMenu in Extension Library, and now I need a onclick event that will run server side code. The only events in the is onItemClick and that is client side only.



    How can I get a onclick server side on this control? I tried adding

    • Use the submitValue property

      By Philippe Riand 1 decade ago

      A node cannot have such an event handler, because the nodes are dynamic (can be generated at render time, based on the content of a view, for example) and they are not controls.

      But, they have a submitValue property. When the value of this property is not null, then a click generates an onItemClick event to it parent control. And the control can have a regular eventHandler. In the handler, ou then have to check for the submitted value to understand which node generated it.

      There are multiple examples of this in the demo database.