473,748 Members | 6,412 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Treeview object using in ASP

Hello,
Maybe someone can help?

According to ms kb-article 183329 i am trying to populate a treeview object
on a asp-page, with realtime data from a accessdatabase.
The database routine works fine and correctly returns the required records,
the treeview object is not populated.
The syntax of the treeview1.nodes .add statement is correct (have them
written to the browser to check) but still no entries in the object.

i searched almost the entire internet ;-), but found no solution? Please
help....

Regards
Jul 19 '05 #1
2 2448
Show the code please, including the creation of the object.....

--
----------------------------------------------------------
Curt Christianson (Software_AT_Da rkfalz.Com)
Owner/Lead Designer, DF-Software
http://www.Darkfalz.com
---------------------------------------------------------
...Offering free scripts & code snippits for everyone...
---------------------------------------------------------
"HarryD" <mo*******@hotm ail.com> wrote in message
news:3f******** *************** @dreader7.news. xs4all.nl...
Hello,
Maybe someone can help?

According to ms kb-article 183329 i am trying to populate a treeview object on a asp-page, with realtime data from a accessdatabase.
The database routine works fine and correctly returns the required records, the treeview object is not populated.
The syntax of the treeview1.nodes .add statement is correct (have them
written to the browser to check) but still no entries in the object.

i searched almost the entire internet ;-), but found no solution? Please
help....

Regards

Jul 19 '05 #2
Intention is that a database with only one table is read, which contains all
members of a family. The table contains a parent-child id as well, so,
knowing the most toplevel (which is the starting point) it is possible to
drilldown to the youngest member in the family.
I build the same stuff into VB itself (v6) and that works fine.
Code is as follows:
<%@ LANGUAGE="VBSCR IPT"%>

<%
Response.Expire s = -1
dq = Chr(34)

'Open connection to database
Set Conn = Server.CreateOb ject("ADODB.Con nection")
Conn.Open "DBQ=D:\Inetpub \webdata\family .mdb;Driver={Mi crosoft Access Driver
(*.mdb)};Driver Id=25;FIL=MS Access;"

Sub main()
Dim First_Node
First_Node = "F235M234"
Call Retrieve_Tree(F irst_Node)
End Sub

Sub Retrieve_Tree(P arent)

SQLStr = "Select ID, PartnerID, MarriageID, IDParentMarriag e, Lastname,
FirstName from Persons where IDParentMarriag e = '" + Parent + "' ORDER BY
DateOfBirth"
Set rs = Conn.Execute (SQLStr)

If rs.EOF Then
Exit Sub
End If

If Not rs.EOF Then
rs.MoveFirst
End If

While Not rs.EOF
strName = rs("Lastname") & ", " & rs("Firstname" )
OwnID = rs("MarriageID" )
ParentID = rs("IDParentMar riage")

'Nu afdrukken, maar ook functie aanroepen die TreeView1 object vult, met
parameters
'Response.Write strName & "<BR>"
Call FillTreeNew (OwnID, ParentID, strName,4)

Response.Write "<BR>"

Call Retrieve_Tree (rs("MarriageID "))
rs.MoveNext
Wend
End Sub

%>

<SCRIPT LANGUAGE="VBScr ipt">
<%
Sub FillTreeView(Ow nID,ParentID,st rName)
Response.Write "TreeView1.Node s.Add " & dq & ParentID & dq & ",tvwChild, "
& dq & OwnID & dq & "," & dq & strName & dq
End Sub
%>
</SCRIPT>

<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR " content="Micros oft FrontPage 5.0">
<meta name="ProgId" content="FrontP age.Editor.Docu ment">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 4</title>
<LINK HREF="/Stylesheets/content.css" REL="STYLESHEET " TYPE="TEXT/CSS">
</head>

<body>

<OBJECT ID="TreeView1" WIDTH=400 HEIGHT=500
CLASSID="CLSID: 0713E8A2-850A-101B-AFC0-4210102A8DA7">
<PARAM NAME="_ExtentX" VALUE="7938">
<PARAM NAME="_ExtentY" VALUE="10583">
<PARAM NAME="_Version" VALUE="327682">
<PARAM NAME="LineStyle " VALUE="1">
<PARAM NAME="Style" VALUE="6">
<PARAM NAME="Appearanc e" VALUE="1">
</OBJECT>
<p>Content</p>
<HR>

<%
FillTreeNew "F235M234","NUL L","STAALBER G, Hendrik", 0
Response.Write "<BR>"
Main
%>

<SCRIPT LANGUAGE="VBScr ipt">
TreeView1.Font. Name = "Tahoma"
TreeView1.Font. Size = 9
TreeView1.Nodes .Add "NULL",0,"F235M 234","STAALBERG , Hendrik"

<%
Sub FillTreeNew(Own ID,ParentID,str Name,Prm)
'************ Populate the Control *************** ***************
Response.Write Chr(10) & "TreeView1.Node s.Add " & dq & ParentID & dq &
"," & Prm & "," & dq & OwnID & dq & "," & dq & strName & dq & chr(10) &
chr(13)
End Sub
%>
</SCRIPT>


<%
Conn.Close
Set rs = Nothing
Set Conn = Nothing
%>

</body>

</html>

"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
news:#w******** ******@tk2msftn gp13.phx.gbl...
Show the code please, including the creation of the object.....

--
----------------------------------------------------------
Curt Christianson (Software_AT_Da rkfalz.Com)
Owner/Lead Designer, DF-Software
http://www.Darkfalz.com
---------------------------------------------------------
..Offering free scripts & code snippits for everyone...
---------------------------------------------------------
"HarryD" <mo*******@hotm ail.com> wrote in message
news:3f******** *************** @dreader7.news. xs4all.nl...
Hello,
Maybe someone can help?

According to ms kb-article 183329 i am trying to populate a treeview

object
on a asp-page, with realtime data from a accessdatabase.
The database routine works fine and correctly returns the required

records,
the treeview object is not populated.
The syntax of the treeview1.nodes .add statement is correct (have them
written to the browser to check) but still no entries in the object.

i searched almost the entire internet ;-), but found no solution? Please
help....

Regards


Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
821
by: feel | last post by:
Goin' crazy with this recursive function ported from delphi... I send a string like DirA/ DirB /DirC but i get in the treeView each one in a new node.Cant get the child node....!! -DirA -DirB -DirC instead of: DirA | - DirB
2
4571
by: Trond Hoiberg | last post by:
Let say i have a bunch of files. Logfiles that is stored in subfolders. Folder1 --logfile1 --logfile2 --logfile3 Folder2 --logfile1 --logfile2 I want to display these files using data from the files in an TreeView
8
4407
by: Hrvoje Voda | last post by:
What is wrong in this code? private void tree_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) { if (e.KeyCode == Keys.Enter ) {
7
2837
by: vsiat | last post by:
I am trying to create a treeview out of a database table with the typical structure ID, NAME, PARENTID, TYPE, EXTRA_INFO, where is linked to the . What I want to achieve is create a tree made of custom, extended nodes, which include all the extra information contained in the table and not just typical TreeNode objects. To do that, I first created a structure with all the extra
6
4934
by: L.M | last post by:
Hello, I knew how to use the treeview under VB6. After migrating to .NET, well, I'm lost. I try to add a new node, either to the same level or as a child to a selected node in the treeview. However, either it only add it to the root level or it only add it on level below, doesn't matter what I select. And in some case, I just get an exception.
0
4745
by: Brian Keating | last post by:
hi there i've a test program that creates a treeview and destroys it over and over, i keep track of the gdi object count for the process and see if they are ok. However when i switch on checkboxes for my test app i get a gdi handle leak anyone got any ideas on this one? using System;
10
2365
by: p3t3r | last post by:
I have a treeview sourced from a SiteMap. I want to use 2 different CSS styles for the root level nodes. The topmost root node should not have a top border, all the other root nodes should have a top border. Is it possible to have more than 1 style at the same level (parent node) when using a SiteMap? I want it to appear something like this and I can only find a way to either have the border on all root nodes or none at all. In...
2
5511
by: makennedy | last post by:
Hi Experts, Please help, I am a newbie to ASP.NET 2.0 may be I am doing something wrong or there may be a bug somewhere. Basically I have a TreeView Control which I have created programmatically. And I want to bind the selection of a TreeNode (which is a record) from the database) to a DetailsView which shows the datatable record for the selected TreeView node in the Details View. I am using IDE : Visual Web Developer 2005 Express; OS=...
0
3311
by: divya1949 | last post by:
Create a windows c# application which will Read a xml file and populate nodes in the treeview. 1 On selection of treenode display the child nodes of that node in listview control 2. Provide following view properties to listview, through View menu a. Tile b. Icon
9
6130
by: auntiejack56 | last post by:
Hi, I've got a treeview, and I want to display the node text property that I have a) clicked on or b) highlighted using the up or down arrows
0
8991
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8831
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9374
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9249
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6796
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4607
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4876
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3315
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.