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

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsClientAPIClientAPItreeview and postbacktreeview and postback
Previous
 
Next
New Post
11/4/2006 6:39 PM
 
    Hi,

I am a beginner with dotnetnuke and i try to develop a module. I use the dnn treeview but i've got a problem. When i check some subnode, the page postback and the treeview disapear (did not feed). This problem seems not to appear when i am connected as admin. i'm a little bit disapointed !! Here the source

// the populate function
private void PopulateTree()
        {
           MyDNNTree.TreeNodes.Clear();

          CalendrierController objFormations = new CalendrierController();
          List<CalendrierInfo> LstCalendrierInfo = objFormations.GetCalendrierByPeriode(Convert.ToDateTime("2006/09/01"), Convert.ToDateTime("2006/10/25"));

         
           string curLibelleGenre = "";
           string curLibelleFormation = "";
           DotNetNuke.UI.WebControls.TreeNode tnFormation = new DotNetNuke.UI.WebControls.TreeNode();

           foreach (CalendrierInfo objCalendrier in LstCalendrierInfo)
           {
               if (objCalendrier.LibelleGenre != curLibelleGenre)
               {
                   tnGenre2 = new DotNetNuke.UI.WebControls.TreeNode();
                   tnGenre2.Text = objCalendrier.LibelleGenre;
                   tnGenre2.ClickAction= eClickAction.Expand;
                   tnGenre2.CssClass = "SecteurFormation";
                   MyDNNTree.TreeNodes.Add(tnGenre2);
               }
               if (curLibelleFormation != objCalendrier.LibelleFormation)
               {
                   tnFormation = new DotNetNuke.UI.WebControls.TreeNode();
                   tnFormation.Text = objCalendrier.LibelleFormation;
                   tnFormation.ID = objCalendrier.IdFormation;
                   tnFormation.CssClass = "LibelleFormation";
                   tnGenre2.TreeNodes.Add(tnFormation);
               }
               curLibelleFormation = objCalendrier.LibelleFormation;
               curLibelleGenre = objCalendrier.LibelleGenre;
           }
                  
        }

//the page load
        protected void Page_Load(System.Object sender, System.EventArgs e)
        {
            try
            {
                if (!Page.IsPostBack)
                {
                    PopulateTree();
                }
            }
            catch (Exception exc) //Module failed to load
            {
                Exceptions.ProcessModuleLoadException(this, exc);
            }
        }

// and the
eventhandler
        protected void MyDNNTree_PopulateOnDemand(object source, DNNTreeNodeClickEventArgs e)
        {
            foreach (DotNetNuke.UI.WebControls.TreeNode TnCur in MyDNNTree.SelectedTreeNodes)
            {
                Label1.Text = Label1.Text + "-" + TnCur.Text.ToString() + "-" + TnCur.ID.ToString() ;            }
        }


Is there anyone who understand my problem and can help me ?

Thanks a lot
 
New Post
11/6/2006 9:45 AM
 

Have you put a breakpoint in your code to see what is happening?  Is there a specific reason you want the click to do the postback in the first place?  If not, change your ClickAction to something other than postback.

 


 
New Post
11/7/2006 3:46 PM
 
Thanks, i've resolved this issue. It was just an issue with the dnn cache. I use postback because I need to update some som control. Now it works, I will try to implement ajax functionality. But before i will read another time the doc !! Thanks again
 
New Post
12/2/2010 5:04 AM
 
Hi David, Did you manage to solve this issue. I am facing the same issue. Treeview working fine when logged as admin but not f logged with a user with view permissions. If i provide edit content permission on the module then it works fine. Regards, amarjit
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsClientAPIClientAPItreeview and postbacktreeview and postback


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