franklt69
22 Feb 2007, 7:55 AM
Hi I need show the data in the grid first in SingleSelectionModel, the user can browse using key arrow. if user do doubleclik on in cell then I need to change to EditorSelectionModel, if user press Esc key or click on a button cancelEdit then again return to SingleSelectionModel, how I can do, I was testing using it but don't get it work.
any help please
Kind regards
Frank
gridAddress.addListener('rowdblclick', this.onCelldblClick, this, true);
},
onCelldblClick : function(gridAddress, rowIndex, columnIndex, e){
//colModelAddress.isCellEditable = function(columnIndex, rowIndex){ return edit; };
/* if (edit == true)
gridAddress.startEditing;
else
gridAddress.stopEditing;*/
},
onEditAddress : function(){
//dlgEditAddress.init();
//edit = true;
smAddress = new YAHOO.ext.grid.EditorSelectionModel();
},
onCancelAddress : function(){
//edit = false;
smAddress = new YAHOO.ext.grid.SingleSelectionModel();
},
any help please
Kind regards
Frank
gridAddress.addListener('rowdblclick', this.onCelldblClick, this, true);
},
onCelldblClick : function(gridAddress, rowIndex, columnIndex, e){
//colModelAddress.isCellEditable = function(columnIndex, rowIndex){ return edit; };
/* if (edit == true)
gridAddress.startEditing;
else
gridAddress.stopEditing;*/
},
onEditAddress : function(){
//dlgEditAddress.init();
//edit = true;
smAddress = new YAHOO.ext.grid.EditorSelectionModel();
},
onCancelAddress : function(){
//edit = false;
smAddress = new YAHOO.ext.grid.SingleSelectionModel();
},