* Fires when the grid is rendered
* @param {Grid} grid
*/
- 'render' : true
+ 'render' : true,
+
+ /**
+ * @event beforerowremoved
+ * Fires before row is removed
+ * @param {Roo.grid.GridView} gridview
+ */
+ "beforerowremoved" : true,
+ /**
+ * @event beforerowsinserted
+ * Fires before row is inserted
+ * @param {Roo.grid.GridView} grid
+ */
+ "beforerowsinserted" : true,
+ /**
+ * @event beforerefresh
+ * Fires before grid is refresh
+ * @param {Roo.grid.GridView} gridView
+ */
+ "beforerefresh" : true,
+ /**
+ * @event rowremoved
+ * Fires when row is removed
+ * @param {Roo.grid.GridView} grid
+ */
+ "rowremoved" : true,
+ /**
+ * @event rowsinserted
+ * Fires when the row is inserted
+ * @param {Roo.grid.GridView} grid
+ */
+ "rowsinserted" : true,
+ /**
+ * @event rowupdated
+ * Fires when the row is updated
+ * @param {Roo.grid.GridView} grid
+ */
+ "rowupdated" : true,
+ /**
+ * @event refresh
+ * Fires when the grid is refreshed
+ * @param {Roo.grid.GridView} grid
+ */
+ "refresh" : true
+
+
});
Roo.grid.Grid.superclass.constructor.call(this);
getView : function(){
if(!this.view){
this.view = new Roo.grid.GridView(this.viewConfig);
+ this.view.relayEvents(this, [
+ "beforerowremoved", "beforerowsinserted",
+ "beforerefresh", "rowremoved",
+ "rowsinserted", "rowupdated" ,"refresh"
+ ]);
}
return this.view;
},
this.splitSelector, cid, " {\n}\n");
}
return Roo.util.CSS.createStyleSheet(ruleBuf.join(""), rulesId);
- }
+ }
});/*
* Based on:
* Ext JS Library 1.1.1
}
}
+ if (sm.getSelections && sm.getSelections().length < 1) {
+ return false;
+ }
+
+ // before it used to all dragging of unseleted... - now we dont do that.
if(rowIndex !== false){
// if editorgrid..
grid: this.grid,
ddel: this.ddel,
rowIndex: rowIndex,
- selections:sm.getSelections ? sm.getSelections() : (
- sm.getSelectedCell() ? [ this.grid.ds.getAt(sm.getSelectedCell()[0]) ] : []
- )
+ selections: sm.getSelections ? sm.getSelections() : (
+ sm.getSelectedCell() ? [ this.grid.ds.getAt(sm.getSelectedCell()[0]) ] : [])
};
}
return false;
},
-
+
+
onInitDrag : function(e){
var data = this.dragData;
this.ddel.innerHTML = this.grid.getDragDropText();