Welcome Guest Search | Active Topics | Sign In | Register

Tree View Double Click Options
Kevin Hoot
Posted: Friday, January 22, 2010 2:03:07 PM
Rank: Member
Groups: Member

Joined: 6/8/2007
Posts: 13
By default, double click on a tree view node will enter edit mode. If Edit Mode is disabled, can the double click be passed to a javascript function.

Also, even with the edit mode disabled, the double click is still handled by treeview instead of performing two click events. Is this normal?

eo_support
Posted: Monday, January 25, 2010 10:02:47 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

I don't believe this is possible. Double click is strictly associated to node editing and it is not interpreted in any other way. It is unusual for a TreeView control to have the "normal" double click because generally "double click" means open and a single click is sufficient for this when the context is a TreeView.

Thanks!

Kevin Hoot
Posted: Monday, January 25, 2010 10:26:42 AM
Rank: Member
Groups: Member

Joined: 6/8/2007
Posts: 13
Wouldn't the single click be fired when users are attempting to select multiple nodes. The double click is normally used for opening the node (i.e. document in this case) but TreeView does a name edit instead. All I want is when the user double clicks the node (document) is to open the document in another window. Is this possible?
eo_support
Posted: Monday, January 25, 2010 10:43:55 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

No. We fire a single item click event (ClientSideOnItemClick) when we receive an onclick event from the browser. We do not pass dblclick event to user code. So if you click twice very fast and it is interpreted as a dblclick by the browser (note this may various by browsers), you can get a single click event and no dblclick event; If you click slightly slower, you will get two separate item click events. If you wish to perform different actions for "double click", the second situation is what you will be able to catch and identify.

Thanks!
Kevin Hoot
Posted: Monday, January 25, 2010 11:24:34 AM
Rank: Member
Groups: Member

Joined: 6/8/2007
Posts: 13
Ok, bottom line is I want to open (view) a document when the user double clicks (same as windows explorer, etc). I can use the Item click but it is inconsistant. If I double click on a node nothing happens. If I slowly double click on a node with Edit enabled, I get into edit mode. What is the action for a double click?

Currently I am using the AllowEdit="true" ClientSideOnNodeRenaming="ViewDocument" on my treeview and then in the javascript:

function ViewDocument(treeView, treeNode, newText) {
var txtdestnode = treeNode.getItemId();
intFileNum = txtdestnode.substring(0, txtdestnode.indexOf("("));
CallFunction("View");
return false;
}

Note: the CallFunction("View") does a window.open with a link to the document in the web server. Maybe I am missing something but that is all I really need with a double click, open a file.

Thanks
eo_support
Posted: Monday, January 25, 2010 11:37:27 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Kevin Hoot wrote:
same as windows explorer, etc

I don't believe Windows Exploer TreeView does double click. As we have already explained in our previous post, it is very unusual for a TreeView to do double click. I believe I understand what you want to do but unfortunately you are just asking for something that does not exist. The product is what it is and we do our best to explain to you how it works. We do value user feedbacks but there is no way that we can always make the product work the way every single user wanted. We do not see any future changes on the TreeView as to this behavior.

This issue is now closed.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.