在onready函数中,在grid.startup之后,执行以下操作:
dojo.connect(grid, "onRowClick", grid, function(evt){ var idx = evt.rowIndex, item = this.getItem(idx); // get the ID attr of the selected row var value = this.store.getValue(item, "ID"); //open a dialog or new window or redirect to new JSP //to redirect to new jsp, you can set window.location.href to the new url //to open a new dialog, i suggest using dijit.dialog //see: http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/tests/test_Dialog.html //to open a new window, use window.open //http://www.pageresource.com/jscript/jwinopen.htm});更多网格示例,请访问:http
:
//dojotoolkit.org/documentation/tutorials/1.6/working_grid/
API文档列出了所有可能的事件:http
:
//dojotoolkit.org/api/1.6/dojox/grid/DataGrid#onApplyCellEdit



