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

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesDNN Module with 2 view controls. How to use ListView and QueryExtender in seperate view controls?DNN Module with 2 view controls. How to use ListView and QueryExtender in seperate view controls?
Previous
 
Next
New Post
3/16/2012 1:06 AM
 

I am building a DNN Module that has multiple packages. One of the packages has 2 view modules, one for a ListView and the other for a filter (QueryExtender). The idea is to allow the user to place the ListView and filter wherever they want on a page.

I am using an EntityDataSource.

When the Data Source, ListView and filter (QueryExtender) are in the same control (.ascx file), it works just fine. But when the ListView and filter (QueryExtender) are put in two separate controls (.ascx files), for example Filter.ascx and ListView.ascx, it doesn't work.

Not sure how to approach this. Any ideas?

 
New Post
3/16/2012 3:00 AM
 

Someone suggested using IMC and having the QueryExtender send the ListView what it needs (thanks Mike). IMC does seem like the way to do it. However, I am not sure what the listview needs and when to send it.

After consideration, some reading and trial of some alternatives, I decided sending a collection of parameters to the query extender via IMC would be the cleanest way to do it. But the textbox.text goes blank (some kind of variables' late binding issue; response.write shows the value and hard coding the value for the parameter works, so it's not anything to do with the collection and its objects) so the parameters all come across with blank values.

I have been searching the net for days on this. Where could I find more information about this specific topic?

 
New Post
3/16/2012 5:38 AM
 

Deusbelli

Why you do not want to use 2 different modules and to pass data between them? Each DNN module has only one Primary control (with a lot of subcontrols inside) with type "View".

Another possible solution for you is to have single control with type View. Inside of this control you can have 2 subControls: Control1 and Control2. Also in the settings you can define what control should be displayed for current instance of the module. It should work, but this is not "clear" solution. I prefer to build 2 different modules and to pass data between them.

Sergey, forDNN Team

 
New Post
3/16/2012 6:59 AM
 

Sergey,

That is what I am trying to do. I am using IMC (Inter-Module Communication) to do it; IMC works well. I have 2

I want to pass data cleanly and simply. I could just pass data to some hidden fields or write a bunch of L2E code, but these are maintenance prone. If I could do something simple like pass a query extender object, I could write that code once and never have to touch it again; all future changes could be made in markup and not code. I also don't want to break my design time environment.

I'm sure that there are a thousand ways to do it, but I am looking for the simplest way to do it.

Thank you helping.

 
New Post
3/22/2012 12:24 PM
 

Finally got it working. I'm not sure why it would work with hard coded values and not with variables, but if you call 'rebind' on the QueryExtender right after you add the Expressions/parameters to it, it works with variables perfectly. Now I can move the Filter and Results ListView to any pane on the page.

In case someone ever wants to do something similar, here is how it works:

I used 2 view controls with IMC. The Sender has all the input controls (dnnTextBoxes and dnnComboBoxes) and a dnnRadButton. A collection of Expressions is built in the codebehind when the button is clicked. The Sender then uses IMC to pass the collection to the Listner. The Listner has the Entity Data Source, a ListVIew and an empty QueryExtender. When the Listner receives the message, it loops though the collection adding the Expression objects to the QueryExtender, and finally calls the QueryExtender's rebind method.

 If anyone has a better solution for a Filter and Results that can be moved to any pane on the page, please let me know.

 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesDNN Module with 2 view controls. How to use ListView and QueryExtender in seperate view controls?DNN Module with 2 view controls. How to use ListView and QueryExtender in seperate view controls?


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