PDA

View Full Version : Grids selModel, select on double click



Dr. Flink
6 Jul 2012, 7:37 AM
Is my memory betraying me or has the selModel configuration to specify the number of clicks it takes to select a row disappeared?
What is the easiest way to accomplish this behaviour? Setting disableSelection to false, and select at itemdblclick is a no go...

Tnx

friend
6 Jul 2012, 8:44 AM
You may be thinking of the grid RowEditing plugin's clicksToEdit config property.

Personally, I think double-click to select is a bad idea; it's 180 degrees opposite to the manner in which most all computers operate.

Dr. Flink
6 Jul 2012, 8:54 AM
Friend, thank you for your reply!

You're probably right , I must be thinking about the RowEditing plugin.
And, I agree with you about the user experience. But, what I want to do is to open a window when selecting a grid row, you could compare this user experience with the RowEditing plugin. I want the window to show when the row is selected (=when double clicked).

friend
6 Jul 2012, 9:04 AM
Ah, I gotcha. That sounds logical.

If you just want to pop a window on double-click for the target row, capture the grid's itemdblclick (http://docs.sencha.com/ext-js/4-0/#%21/api/Ext.grid.Panel-event-itemdblclick) event and you can do whatever you like.

Dr. Flink
6 Jul 2012, 9:22 AM
Yes, that's what I'm doing now. But I don't want the row to be selected before it's doubleclicked :).