CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > starter_kits_and_source_projects.internet_explorer_web_controls Tags:
Item Type: NewsGroup Date Entered: 3/11/2005 5:31:19 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 0 Views: 63 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
11 Items, 1 Pages 1 |< << Go >> >|
apicazo
Asp.Net User
Scroll to selected node treeview3/11/2005 5:31:19 PM

0/0

Hi,

I am trying to select a node in a treeview, but the problem is that the scroll does not go to the right position. Anyone knows how to do it?

Thanks in advance

fulin_321
Asp.Net User
Re: Scroll to selected node treeview3/15/2005 8:46:41 AM

0/0

good!!!
jagdish_ce
Asp.Net User
Re: Scroll to selected node treeview9/23/2005 12:04:22 PM

0/0

Hi,

   I have same problem as you...if you get any idea then let me know

  Thanks in advance

Regards,
Jagdish Sakhiya
IVAPS Pvt LTD, Bangalore

dingonet
Asp.Net User
Re: Scroll to selected node treeview10/25/2005 7:27:15 AM

0/0

 jagdish_ce wrote:

Hi,

   I have same problem as you...if you get any idea then let me know

  Thanks in advance

Regards,
Jagdish Sakhiya
IVAPS Pvt LTD, Bangalore


AND ME TOO!! I find some said "in javascript get the nodeid.then use .node.scrollIntoView" ..But it doesn"t  work ..ie pro:document.all(...)is null.or the object haven't the mothed...
mjkrsk
Asp.Net User
Re: Scroll to selected node treeview11/9/2005 4:56:03 AM

0/0

Are you using the TreeView in ASP.Net 2.0?

If so, the Element ID convention is TreeView.ID + Node Index.

The javascript syntax to scroll to the 99th node on a TreeView whose ID is "TreeView" is: 
   document.all("TreeView99").scrollIntoView(true);

I have been trying to find the elementID of a node, and can't seem to get it (with the new ASP.Net 2.0 TreeView).  In the Web Control version (pre 2.0) I could programmatically select the node, then register a client side script to ZoomToSelectedNode, which worked great.  Unfourtunately, in ASP.Net 2.0 the tree view doesn't seem to support TreeView.selectedNodeIndex (javascript property).  I am still working on it!

If you are using the older version of the web control, I can give you specific code examples of how to do it.
jagdish_ce
Asp.Net User
Re: Scroll to selected node treeview12/28/2005 5:36:32 AM

0/0

Hi,

    Thanks for help........ Can you send me code....so, i can understand it.........

   Thanks in advance

Regards,

Jagdish Sakhiya

 

 

 

ruwansira
Asp.Net User
Re: Scroll to selected node treeview1/20/2006 4:43:33 AM

0/0

Hi,

    I have the same problem. Thanks for your ideas........ Can you send the code me also....then, i can understand it.........

   Thanks in advance

Regards,

- Ruwan Siriwardena

groggy
Asp.Net User
Re: Scroll to selected node treeview3/29/2006 6:15:05 AM

0/0

Hi,

    Can you send me the specific code examples....

   Thanks in advance

Regards,

Timo Korhonen

jptrue
Asp.Net User
Re: Scroll to selected node treeview5/16/2006 4:55:25 PM

0/0

I have found a solution that works for me:

//the client-side ID of the SelectedNode of TreeView1 is

//stored in an hidden input named TreeView1_SelectedNode

var inpSelectedNode = document.getElementById("TreeView1_SelectedNode");

if (inpSelectedNode.value != "")

{

var objScroll = document.getElementById(inpSelectedNode.value);

//my treeview is contained in a scrollable div element

divTree2.scrollTop = findPosY(objScroll);

//this works as well bu, but there is not as much control over the y position

//document.all(inpSelectedNode.value).scrollIntoView(true);

}

function findPosX(obj)

{

var curleft = 0;

if (obj.offsetParent)

{

while (obj.offsetParent)

{

curleft += obj.offsetLeft

obj = obj.offsetParent;

}

}

else if (obj.x)

curleft += obj.x;

return curleft;

}

 

function

findPosY(obj)

{

var curtop = 0;

if (obj.offsetParent)

{

while (obj.offsetParent)

{

curtop += obj.offsetTop

obj = obj.offsetParent;

}

}

else if (obj.y)

curtop += obj.y;

return curtop;

}

 

 

The findPosY function was "borrowed" from here:

http://www.quirksmode.org/js/findpos.html

Thanks,
Jeff

radishj
Asp.Net User
Re: Scroll to selected node treeview9/19/2006 2:11:43 AM

0/0

Hi,

I tried your solution.

How come document.getElementById("TreeView1_SelectedNode") return me a NULL?

Did you try this code in ASP 2.0?

Thanks

thenels
Asp.Net User
Re: Scroll to selected node treeview10/19/2007 5:17:39 PM

0/0

My Treeview is named tvInfoDocs.  The wrapper div is named divScroll.  The solution for asp.net 2.0 to scroll a wrapper div to the selected node is as follows:

function scrollNodeIntoView() {

var name = tvInfoDocs_Data.selectedNodeID.value;

var selectedNode = document.getElementById(name);

if (selectedNode == null) {

alert('selectednodeis null');

}

else {var tvDiv = document.getElementById('divScroll');

tvDiv.scrollTop = findPosY(selectedNode);

tvDiv.scrollLeft = findPosX(selectedNode);

}

}

function findPosX(obj) {

var curleft = 0;

if (obj.offsetParent) {

while (obj.offsetParent) {

curleft += obj.offsetLeft

obj = obj.offsetParent;

}

}

else if (obj.x)

curleft += obj.x;

return curleft;

}

function findPosY(obj) {

var curtop = 0;

if (obj.offsetParent) {while (obj.offsetParent) {

curtop += obj.offsetTop

obj = obj.offsetParent;

}

}

else {if (obj.y) {

curtop += obj.y;

}

}

return curtop;

}

 

11 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Programming Microsoft Visual Basic 6.0: [master Object-oriented Programming Techniques for Rapid 32-bit Development] Authors: Francesco Balena, Pages: 1276, Published: 1999
Pro .NET 2.0 Windows Forms and Custom Controls in C#: From Professional to Expert Authors: Matthew MacDonald, Pages: 1037, Published: 2005
Pro .NET 2.0 Windows Forms and Custom Controls in VB 2005 Authors: Matthew MacDonald, Pages: 1036, Published: 2006
User Interfaces in C#: Windows Forms and Custom Controls Authors: Matthew MacDonald, Pages: 586, Published: 2002
Visual Basic 2005 with .NET 3.0 Programmer's Reference: Programmer's Reference Authors: Rod Stephens, Pages: 1200, Published: 2007
User Interfaces in VB . NET: Windows Forms and Custom Controls Authors: Matthew MacDonald, Pages: 580, Published: 2002
Beautiful Code: Leading Programmers Explain How They Think Authors: Andy Oram, Greg Wilson, Pages: 593, Published: 2007
Developing and Implementing Windows-based Applications with Visual Basic .NET and Visual Studio .NET Authors: Kirk Hausman, Kalani Kirk Hausman, Mike Gunderloy, Ed Tittel, Pages: 544, Published: 2003
Access 2007 VBA Programmer's Reference Authors: Teresa Hennig, Robert G. Cooper, Rob Cooper, Geoffrey L. Griffith, Armen Stein, Pages: 1110, Published: 2007
Programming .NET Windows Applications Authors: Jesse Liberty, Dan Hurwitz, Pages: 1228, Published: 2003

Web:
Scroll to selected node treeview - ASP.NET Forums I am trying to select a node in a treeview, but the problem is that the scroll does not go to the right position. Anyone knows how to do it? ...
How to scroll to found item in a treeview or a listview - .NET I just know that whatever node I tell to be the SelectedNode on my treeview, the treeview will scroll it's way to that node and select it. ...
TreeView.SelectedNode TreeView.SelectedNode - Microsoft Dot NET Compact Framework. ... (my original reply answers the question how to scroll the already selected ...
Scroll a node into view -- ASPNET 2.0 Treeview TreeView.Nodes.IndexOf(TreeView.SelectedNode) --or-- (when you have the ValuePath) ... will scroll the currently selected node into view. ...
ASP.Net 2.0 Treeview scroll/focus problem selected node and then scroll to it. The TreeView creates an object in Javascript on the client side that's called [treeview name]_Data ...
How To Scroll the TreeView When Dragging and Dropping a Node Drag vbBeginDrag End If End Sub. 8. Save and run the sample. Select a Node and then drag it to the bottom of the TreeView. You will see the TreeView scroll. ...
Large treeview scrolling I have a large treeview with more than 100000 items. When i programmatically select a node it will not always be visible node = jumplist(0) ...
scroll to selected node - telerik Forum NET ยท Treeview for ASP.NET scroll to selected node ... but the scrollbar on the next page doesn't scroll to selected node. ...
How to scroll treeview - VBForums How to scroll treeview Visual Basic 6 and Earlier. ... 2.scroll this tree 3. avoid select other node Thanks. Metalpalo is offline ...
How to move to next node in TreeView? - .NET C# SelectedNode = treeView.SelectedNode.NextVisibleNode; ... NextVisibleNode does not scroll to out of view nodes. Here is part of my ...




Search This Site:










restricting users

out-of-process+isapi+extension+request+failed

i cant find the search module in dnn 2

change personalization default option

missing home directory

how do i retrieve a non-primary datakey value from a gridview?

visual studio design capabilities

wf workflow sqlworkflowpersistenceservice

creating/opening websites - directory structure?

active directory based roleproviding?

from asp 1.1 to asp 2.0 on windows server 2003

search engine problem

toolbar state

storing encrypted connection string

difference between release candidate and final version...?

how to create a login with roles using custom db

bug: case matters

form and windows authentication

genericprincipal object and security

use email as username for login in asp.net2.0

need help answering some questions

iis 5.1 problem

firefox and webparts

how to auto login after adding userid

dynamically change number of tabs on tabstrip

discriminatory security

login

authentication, impersonation and evenlog etc.

wadsworth psk and gmail...

asp.net 2.0 beta 2

 
All Times Are GMT