View Full Version : How to stop double-click in view/grid
waldav00
21 Mar 2008, 11:06 AM
Is there any way to stop the users from double-clicking on a line in a view/grid to open the underlying document?
mjlecomte
21 Mar 2008, 12:02 PM
I don't understand your question, but if you want to disable editing on some rows of an editable grid, you can see the Grid FAQ, it's addressed in it.
waldav00
21 Mar 2008, 12:04 PM
The standard functionality on a Notes view/grid is when a user double-clicks on any row, it opens the document in a new window. I want to disable this.
mjlecomte
21 Mar 2008, 12:08 PM
Oh, sorry, didn't realize I was responding in the notes forum. Dunno. Might be similar answer though?
Zakaroonikov
21 Mar 2008, 1:11 PM
Maybe:
Ext.nd.UIView.gridHandleRowDblClick = Ext.empyFn;
This should change the double click handler routine to an empty function. Otherwise you can remove the event completely from each instance of the object
jratcliff
21 Mar 2008, 6:36 PM
Rich and I are planning on adding events you can subscribe to for both the UIOutline and UIView. For now, however, you can do what Zakaroonikov suggests.
Below is an example where you have two views on a page and 'view1' has its row double click disabled and 'view2' does not.
var view1 = new Ext.nd.UIView({
viewName : 'f1',
gridConfig: {
renderTo : 'view1',
width : 400,
height : 200,
frame : true
}
});
view1.gridHandleRowDblClick = Ext.emptyFn;
var view2 = new Ext.nd.UIView({
viewName : 'f1',
gridConfig: {
renderTo : 'view2',
width:400,
height:200
}
});
waldav00
26 Mar 2008, 3:21 PM
Thanks. That code works perfectly!!
view1.gridHandleRowDblClick = Ext.emptyFn;
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.