How to delete a sub-set of functions batch delete button

Realization of ideas: a collection of registered sub-function rendering form fields before the event, the bulk delete button hidden away.

  1. Find a table object
  2. Operation column objects found actioncolumn
  3. The operation of the column items actioncolumn replace

How to delete a sub-set of functions batch delete button

  1. function(field){

    1. var grid=field.grid;

    2. was actionColumn = null;

    3. for(var i=0;i< p="">

    4. if(grid.columns[i].xtype=='actioncolumn'){

    5. actionColumn=grid.columns[i];

    6. break;

    7. }

    8. }

    9. if(actionColumn){

    10. var items=actionColumn.items;

    11. var newItems=new Array();

    12. Ext.each(items,function(item){

    13. if (item.tooltip! = 'mass delete') {

    14. newItems.push(item);

    15. }

    16. })

    17. actionColumn.items=newItems;

    18. }

    19. }

Join JEPaaS technical exchange group, to learn more
How to delete a sub-set of functions batch delete button

Guess you like

Origin blog.51cto.com/13797782/2437318