How to perform View-Controller separation when using an “actioncolumn” (Ext.grid.column.Action)

前端 未结 2 1003
盖世英雄少女心
盖世英雄少女心 2021-02-09 15:15

In ExtJS 4, I have a grid that contains an action column. Whenever that action is triggered, I want to execute \"my action\".

Without MVC, this would look like this:

2条回答
  •  悲哀的现实
    2021-02-09 15:31

    This post explains an even simpler method than the accepted answer, if you only happen to have one type of actioncolumn item in your grid:

    http://mitchellsimoens.com/actioncolumn-and-mvc/

    Basically: just listen for the actioncolumn's click event in your controller. However, this doesn't work if you need to distinguish between multiple actioncolumn types.

提交回复
热议问题