Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0re asp:treeview control expansionre asp:treeview control expansion
Previous
 
Next
New Post
4/10/2008 3:23 AM
 

Hi All,

            I have a module developed which displays the lists of competencies based on the admin settings. There are different ways to view them and one of them is the treeview.When admin selects this in the settings and updates it i am retrieving the values from db and based on that i am showing the treeview.Here it works fine.And in the main page i have a combo from where user can select the type of view he wants to view the competencies.Here also there is a treeview competencies option as of in the settings.But when selecting the treeview type here the nodes are not expanding and it throws an error like treeview toggle node is not defined.But when the admin sets the view in the settings it works fine though another view is selected and again retrieved back to the treeview.PLEASE HELP.

Heres the code for the function .

 

Protected Sub populatetreeview()Dim objtreeview As List(Of XWD.Modules.XWD_DNN_CompetencyManager.CompetencyInfo)Dim i, count As Integer

 

Dim masterString As String

count = objtreeview.Count

masterString =

""

 

Dim masternode As TreeNode = Nothing

 

 

For i = 0 To count - 1If masterString <> objtreeview(i).CatogeryName Then

masterString = objtreeview(i).CatogeryName

masternode =

Treeview1.Nodes.Add(masternode)

 

New TreeNode(objtreeview(i).CatogeryName.ToString)End If

 

childnode =

masternode.ChildNodes.Add(childnode)

 

Dim childnode As TreeNodeNew TreeNode(objtreeview(i).CompetencyName.ToString)If objtreeview.Item(i).AddColumn = 0 And AddRedirect = 0 Then

childnode.NavigateUrl =

childnode.ImageUrl =

"~/default.aspx?tabid=" & UserTabID & "&ctl=EditUserCompetency" & "&mid=" & UserModuleid & "&AddCompetencyId=" & objtreeview.Item(i).CompetencyId"~/images/add.gif"

 

ElseIf objtreeview.Item(i).AddColumn = 0 And AddRedirect = 1 Then

childnode.NavigateUrl =

childnode.ImageUrl =

"~/default.aspx?tabid=" & UserTabID & "&AddCompetencyId=" & objtreeview.Item(i).CompetencyId"~/images/add.gif"

 

ElseIf objtreeview.Item(i).AddColumn = 1 And EditRedirect = 0 Then

childnode.NavigateUrl =

childnode.ImageUrl =

"~/default.aspx?tabid=" & UserTabID & "&ctl=EditUserCompetency" & "&mid=" & UserModuleid & "&UserCompetencyId=" & objtreeview.Item(i).UserCompetencyId"~/images/edit.gif"

 

ElseIf objtreeview.Item(i).AddColumn = 1 And EditRedirect = 1 Then

childnode.NavigateUrl =

""

childnode.ImageUrl =

"~/images/delete.gif"

 

End If

 

Next

pnlListCompetencieswithstatus.Visible =

False

pnlCompetencies.Visible =

False

pnlListCompetencieswithcatogery.Visible =

False

pnlLsitCompetenciesbycatogery.Visible =

False

PnlMyCompetencies.Visible =

False

pnlMyCompetencieswithstatus.Visible =

False

pnlMycompetenciesbycatogery.Visible =

False

PnlMyCompetencieswithCatogery.Visible =

False

pnlTreeview.Visible =

True

PnlCategories.Visible =

False

PnlMyCategories.Visible =

False

pnlAvailCategories.Visible =

False

pnlAllUserswithCompetency.Visible =

False

pnlUsersCompetencyspecific.Visible =

False

pnlusersCategoryspecific.Visible =

False

 

objtreeview = XWD.Modules.XWD_DNN_CompetencyManager.CompetencyController.XWD_CompetencyManager_GetCompetenciesCatogerywise(UserId)

 

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0re asp:treeview control expansionre asp:treeview control expansion


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out