1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
final Grid grid = new Grid("Tableau", "1185px", "600px",
new MyStore(), new MyColumnModel(),
new EditorGridConfig() {
{
setEnableCtxMenu(false);
setAutoSizeHeaders(true);
}
});
grid.addGridCellListener(new GridCellListenerAdapter() {
public void onCellContextMenu(Grid grid, int rowIndex,
int cellIndex, EventObject e) {
}
public void onCellClick(Grid grid, int rowIndex, int colIndex,
EventObject e) {
// Realisation d'opérations
}
}
});
grid.addGridRowListener(new GridRowListenerAdapter() {
public void onRowContextMenu(Grid grid, int rowIndex, EventObject e) {
MyPopup myPopup = new MyPopup(100,100);
myPopup.show();
myPopup.setVisible(true);
}
}); |
Partager