Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, November 22, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Web Forums - ASP/ASP.NET/Web Services/Other
Forum to discuss building external web applications for SalesLogix. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to ASP/ASP.NET/Web Services/Other | New ThreadView:  Search:  
 Author  Thread: TreeView using Microsoft.Web.UI.WebControls
David Nunnally
Posts: 206
 
TreeView using Microsoft.Web.UI.WebControlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Jul 06 2:59 PM
fiogf49gjkf0d
I have had to create several treeviews (which work) but now need to add some type of tooltip to each node. From what I could find on the web there is imagetooltip and tooltip for the node but I get the following error when I add the node.tooltip = value.

Compiler Error Message: BC30456: 'ToolTip' is not a member of 'Microsoft.Web.UI.WebControls.TreeNode'.

Dim nodeOrgChart As New Microsoft.Web.UI.WebControls.TreeNode()
nodeOrgChart.Text = "Organization Chart"
nodeOrgChart.ImageUrl="/webctrl_client/1_0/images/orgchart.gif"
nodeOrgChart.ToolTip = "Test Tip" <=====***************

Anyone familiar with using this?
[Reply][Quote]
Duncan Cook
Posts: 164
 
Re: TreeView using Microsoft.Web.UI.WebControlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Jul 06 3:28 PM
fiogf49gjkf0d
Looks good to me, not sure if there is a diffrence between .net 1.1 and .net 2

but in my version (2) the first line is
Dim nodeOrgChart As New TreeNode

Not sure if that helps at all
[Reply][Quote]
David Nunnally
Posts: 206
 
Re: TreeView using Microsoft.Web.UI.WebControlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Jul 06 3:38 PM
fiogf49gjkf0d
No help there. My version shows 2.0.50727 (ver2.0?)
[Reply][Quote]
David Nunnally
Posts: 206
 
Re: TreeView using Microsoft.Web.UI.WebControlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Jul 06 8:41 AM
fiogf49gjkf0d
I do notice that if I set the ASP.NET tab in IIS to ver 1.1 then I can use
Dim nodeOrgChart As TreeNode

If I set it to 2.0 I must fully qualify the control as
Dim nodeOrgChart As New Microsoft.Web.UI.WebControls.TreeNode()

But either way the .tooltip is not excepted.
[Reply][Quote]
Duncan Cook
Posts: 164
 
Re: TreeView using Microsoft.Web.UI.WebControlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Jul 06 8:49 AM
fiogf49gjkf0d
Strange that's not the case for me, can you post all your code related to the tree control?
[Reply][Quote]
Duncan Cook
Posts: 164
 
Re: TreeView using Microsoft.Web.UI.WebControlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Jul 06 8:53 AM
fiogf49gjkf0d
Just another point does the tree view work without the tooltip?
[Reply][Quote]
David Nunnally
Posts: 206
 
Re: TreeView using Microsoft.Web.UI.WebControlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Jul 06 8:59 AM
fiogf49gjkf0d
Yes the treeview works perfectly. I just would like to have a tooltip popup onmouseover of the username with the users title. When I add the node.tooltip line it errs. The page in question is quite large so I created a skinny version for you to get an idea of what I am doing.

Had to strip a few things to get it to post here...

@ Import NameSpace="Microsoft.Web.UI.WebControls"
@ Import Namespace="System.Data"
@ Import Namespace="System.Data.SqlClient"
@ Register TagPrefix="ie" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls"
@ Page Language="vb" Debug="false"

<script runat="server">
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
GrowTree
End Sub

Sub GrowTree
Dim nodeOrgChart As New Microsoft.Web.UI.WebControls.TreeNode()
nodeOrgChart.Text = "SalesLogix Organization Chart"
nodeOrgChart.ImageUrl = "/webctrl_client/1_0/treeimages/orgchart.gif"
SLXOrgTree.Nodes.Add(nodeOrgChart)
SLXOrgTree.ExpandLevel = 1
Dim nodeTeams As New Microsoft.Web.UI.WebControls.TreeNode()
nodeTeams.Text = "Teams"
nodeTeams.ImageUrl = "/webctrl_client/1_0/treeimages/team.gif"
nodeOrgChart.Nodes.Add(nodeTeams)
Teams(nodeTeams)
End Sub

Sub Teams(nodeObj As Object)
Dim strConn As String = "Server=MYSERVER UID=MYLOGON PWD=MYPWD database=MYDB"
Dim objConn As New SqlConnection(strConn)
Dim DataSet As New DataSet
Dim daGroups As New SqlDataAdapter("SELECT * FROM USERSECCODE WHERE SECCODETYPE = 'G' ORDER BY SECCODEDESC", objConn)
Dim daMembers As New SqlDataAdapter("SELECT USERNAME, PARENTSECCODEID, USERID, PROFILEDESCRIPTION, ISMANAGER FROM USERJOINS WHERE PARENTSECCODEID IN (SELECT SECCODEID FROM USERSECCODE WHERE SECCODETYPE = 'G') ORDER BY USERNAME", objConn)
daGroups.Fill(DataSet, "dtGroups")
daMembers.Fill(DataSet, "dtMembers")
objConn.Close()
DataSet.Relations.Add("GroupsToMembers", _
DataSet.Tables("dtGroups").Columns("SECCODEID"), _
DataSet.Tables("dtMembers").Columns("PARENTSECCODEID"))
Dim nodeGroups As New Microsoft.Web.UI.WebControls.TreeNode()
Dim nodeMembers As New Microsoft.Web.UI.WebControls.TreeNode()
Dim rowGroups As DataRow
Dim rowMembers As DataRow
For Each rowGroups In DataSet.Tables("dtGroups").Rows
nodeGroups = New Microsoft.Web.UI.WebControls.TreeNode()
nodeGroups.Text = "" + rowGroups("SECCODEDESC") + ""
nodeGroups.ID = rowGroups("SECCODEID")
nodeGroups.ImageUrl = "/webctrl_client/1_0/treeimages/team.gif"
nodeObj.Nodes.Add(nodeGroups)
For Each rowMembers In rowGroups.GetChildRows("GroupsToMembers")
nodeMembers = New Microsoft.Web.UI.WebControls.TreeNode()
nodeMembers.Text = "" + rowMembers("USERNAME") + " - " + rowMembers("PROFILEDESCRIPTION") + ""
nodeMembers.ID = rowMembers("USERID")
If rowMembers("ISMANAGER") = "T" Then
nodeMembers.ImageUrl = "/webctrl_client/1_0/treeimages/manager.gif"
Else
nodeMembers.ImageUrl = "/webctrl_client/1_0/treeimages/employee.gif"
End If
nodeGroups.Nodes.Add(nodeMembers)
Next
Next
DataSet.Dispose()
daGroups.Dispose()
daMembers.Dispose()
objConn.Close()
objConn.Dispose()
End Sub

</script>

!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
html
head
title SalesLogix Organization Chart /title
/head
body
form id="frmSLXOrgTree" method="post" runat="server"
ie:TreeView id="SLXOrgTree" runat="server" /ie:TreeView
/form
/body
/HTML
[Reply][Quote]
Jeremy Brayton
Posts: 491
Top 10 forum poster: 491 posts
 
Re: TreeView using Microsoft.Web.UI.WebControlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Jul 06 12:36 PM
fiogf49gjkf0d
Usually the problem with fully qualifying the name stems from using the same name somewhere in an internal class, or it exists in one of your using statements. Sometimes even fully qualifying the name won't fix issues resulting from using the same name in multiple places.

Not that this is the case, mind you, but it's most often the problem if you have to fully qualify names.
[Reply][Quote]
David Nunnally
Posts: 206
 
Re: TreeView using Microsoft.Web.UI.WebControlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Jul 06 2:12 PM
fiogf49gjkf0d
I agree. But it is odd in this case. Any idea what I might have duplicated in the above code that I might be overlooking?
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: TreeView using Microsoft.Web.UI.WebControlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Jul 06 7:15 PM
fiogf49gjkf0d
According to the docs (See http://msdn.microsoft.com/workshop/webcontrols/webforms/library/treeview/treenode.asp) the TreeNode object does not have a Tooltip property, so the exception being reported is correct. The TreeView control itself does have a ShowToolTip property (See http://msdn.microsoft.com/workshop/webcontrols/webforms/library/treeview/showtooltip.asp) which will cause the default tooltip "Use +/- to expand/collapse" to appear.

I don't see any other tooltip property.
[Reply][Quote]
David Nunnally
Posts: 206
 
I got two good eyes but still don't see!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Jul 06 8:36 AM
fiogf49gjkf0d
Ryan, I was about to say you are wrong.
http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.treenode.tooltip.aspx
But then I realized the error of my way. I am using Microsoft.Web.UI.WebControls and this property is for System.Web.UI.WebControls

All in those details!
[Reply][Quote]
Duncan Cook
Posts: 164
 
Re: I got two good eyes but still don't see!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Jul 06 5:27 PM
fiogf49gjkf0d
David, this is slightly off point, but I noticed you are using the SQL ADO.
I would recommend using the OLEDB, the big advantage of this is you can flip between accessing the data direct (using SQL) or using the SalesLogix provider without having to rewrite your connectors, adapters etc. etc.

The SQL OLEDB string looks something like this

"Provider=SQLOLEDB;Data Source=127.0.0.1;Initial Catalog=E1-Metis;User ID=sysdba; Password=masterkey;"

And the SLX OLEDB string is as follows

"Provider=SLXOLEDB.1;Data Source=127.0.0.1;Initial Catalog=E1-Metis;User Id=Adminassword=''ersist Security Info=True;Extended Properties='Port=1706;Log=On'"
[Reply][Quote]
David Nunnally
Posts: 206
 
Re: I got two good eyes but still don't see!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 21 Jul 06 8:28 AM
fiogf49gjkf0d
Thanks Duncan. I will store that away for future use. Don't pause in posting any suggestions to me. I am learning this more and more each day. I welcome any and all suggestions. I have never had any .NET training PERIOD. I just learn by doing and re-doing and well you get the point!
[Reply][Quote]
Duncan Cook
Posts: 164
 
Re: I got two good eyes but still don't see!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 21 Jul 06 11:56 AM
fiogf49gjkf0d
No worries. Join the club, on the no .Net training and the doing and re-doing approach, but I do find you learn more by just getting stuck in!
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/22/2024 9:42:24 PM