INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Code works fine on localhost and on development server but not on production.

Code works fine on localhost and on development server but not on production.

Code works fine on localhost and on development server but not on production.

(OP)
I am trying to bind childnodes with Radtreeview childnode. Code works fine on localhost and on development server but not on production.
It's creating "AMB Financial Groups Lists" childnode but not populating it with its child nodes.Web server files and database tables are identical on my localhost and on production server

Private Sub PopulateProductNodes(ByRef node As RadTreeNode)
Dim ds As New DataSet
Dim cNode As RadTreeNode


'Try
For x = 0 To node.Nodes.Count - 1
If node.Nodes(x).Nodes.Count > 0 Then
PopulateProductNodes(node.Nodes(x))
Else

'leaf
ds = clsRef.oclsCompany.GetCompStandardList(0, node.Nodes(x).Value)
If ds.Tables.Count > 0 Then
For i = 0 To ds.Tables(0).Rows.Count - 1
cNode = New RadTreeNode
cNode.Value = ds.Tables(0).Rows(i)(2)
cNode.Text = ds.Tables(0).Rows(i)(1)

node.Nodes(x).Nodes.Add(cNode)

If Trim(cNode.Text.ToLower) = "ambChild" Then
Dim dscustcomp As New DataSet
dscustcomp = clsRef.oclsCompany.GetCompStandardListItems(0, cNode.Value, sProdCode)
Dim AMBNode = New RadTreeNode(""ambChild" ", "ambChildGroupsNode")
AMBNode.Selected = TreeNodeSelectAction.Expand
Dim AMBLeafNode = New RadTreeNode
**For Each dr In dscustcomp.Tables(0).Rows
AMBLeafNode = New RadTreeNode(dr.Item("Display"), dr.Item("ID"))
AMBNode.Nodes.Add(AMBLeafNode)
Next**
node.Nodes(x).Nodes.Add(AMBNode)
End If


If node.Nodes(x).Selected <> TreeNodeSelectAction.Expand Then
node.Nodes(x).Selected = TreeNodeSelectAction.Expand
End If
Next
End If
End If
Next
'Finally
ds.Dispose()
ds = Nothing
cNode = Nothing
'End Try
End Sub

RE: Code works fine on localhost and on development server but not on production.

Are you positive the data is the same?
Did you trace through your code and check that the data you expect to populate the node exists?

RE: Code works fine on localhost and on development server but not on production.


is the line below correct?

If Trim(cNode.Text.ToLower) = "ambChild" Then

There's a Capital C there?

j.

RE: Code works fine on localhost and on development server but not on production.

Missing DLL?

"Knowledge is power. Information is liberating. Education is the premise of progress, in every society, in every family." (Kofi Annan)
Oppose SOPA, PIPA, ACTA; measures to curb freedom of information under whatever name whatsoever.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close