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 ForumsClientAPIClientAPIDynamically setting visibility of containerDynamically setting visibility of container
Previous
 
Next
New Post
8/11/2006 5:55 PM
 

Hello There,

I have some serious problems with controlling the visibility functionality
of a container. I tried to put some thing in a visual perspective. Is
there someone who dealed with such an issue before or has a solution
for this. I tried serveral this (even setting cookies from code behind)
But I can't get this to work. I Realy need help with ths one

Thanks in advance,

Pepper


 
New Post
8/15/2006 9:44 AM
 

I am guessing that clicking on A causes a postback, and you are not using AJAX to populate the details.  If that is the case you should be able to minimize the container programmatically with the MinMaxContentVisible method discussed in the DotNetNuke_ClientAPIMaxMin.pdf document (found in the DNN documentation zip).

 


 
New Post
8/17/2006 3:30 AM
 

Thanks Jon, almost there, but there is one thing more.

I put the underneath line in my click event (when user clicks on A record, which also fires imc event)

DotNetNuke.UI.Utilities.DNNClientAPI.set_MinMaxContentVisibile(this, ModuleId, false, DotNetNuke.UI.Utilities.DNNClientAPI.MinMaxPersistanceType.Cookie, false);

what happens is that, indeed the search module collapses to minimize state (thats good  ). But after user clicks on a other page (for example Home) and comes back on the page with these two modules, the search module is still collapsed (and that's not the intention, when antering page, maximized, when searched, minimized). Oke understandable, the cookie is set and it does what it is supposed to do. So I thought why not putting the reverse of collapsing in the onclick event in !IsPostback in the pageload of the search module (can you still follow me?).

This is what I've done to try this, unfortunately this ain't working. Can you, or anyone else help me with this one ?


using System;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using DotNetNuke.Entities.Modules;
using DotNetNuke.Entities.Modules.Communications;
using DotNetNuke.UI.Containers;

namespace MyCompany.Visibility
{
 /// <summary>
 ///     Summary description for Search.
 /// </summary>
 public class Search : PortalModuleBase, IModuleCommunicator
 {
  protected System.Web.UI.WebControls.TextBox txtValue2Send;
  protected System.Web.UI.WebControls.Button bntTriggerImc;

  public event DotNetNuke.Entities.Modules.Communications.ModuleCommunicationEventHandler ModuleCommunication;

  private void Page_Load(object sender, System.EventArgs e)
  {
      if (!IsPostBack)
      {
             DotNetNuke.UI.Utilities.DNNClientAPI.set_MinMaxContentVisibile(this, ModuleId, true,
                  DotNetNuke.UI.Utilities.DNNClientAPI.MinMaxPersistanceType.Cookie, true);

      }
  }

  #region Web Form Designer generated code

  private void bntTriggerImc_Click(object sender, System.EventArgs e)
  {   
      DotNetNuke.UI.Utilities.DNNClientAPI.set_MinMaxContentVisibile(this, ModuleId, false, 
           DotNetNuke.UI.Utilities.DNNClientAPI.MinMaxPersistanceType.Cookie, false);
    
      ModuleCommunicationEventArgs oArgs = new ModuleCommunicationEventArgs();
      oArgs.Text = txtValue2Send.Text;
      oArgs.Sender = "SenderSearc"; 
      oArgs.Target = "TargetDetail";
      if(ModuleCommunication != null)
      {
            ModuleCommunication(this, oArgs);  
      }  
   }
}

 

 
New Post
8/17/2006 4:07 AM
 

Me again,

if there is someone who could and wants to help me with this. Maybe a visual will help : picture

I also added the C# project of the above modules (one project two simple modules ) : C# project

I hope someone have some answers

Thanks in advance,

Pepper

 
New Post
8/17/2006 9:32 AM
 

Before I pull down the sample and try and get it working locally, have you tried changing the persistance type in your function?

DotNetNuke.UI.Utilities.DNNClientAPI.MinMaxPersistanceType.Cookie


 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsClientAPIClientAPIDynamically setting visibility of containerDynamically setting visibility of container


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