Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

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

Status
Not open for further replies.

ShellyBha

Programmer
May 26, 2017
1
US
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
 
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?
 

is the line below correct?

If Trim(cNode.Text.ToLower) = "ambC[highlight #FCE94F][/highlight]hild" Then

There's a Capital C there?

j.
 
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top