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.0GridView Sort event as PostBack triggerGridView Sort event as PostBack trigger
Previous
 
Next
New Post
6/29/2009 4:31 PM
 

 So I finally figured out how to get javascript functions to work in a custom module, but they stop working as soon as I do anything to cause a postback refresh.

The module I have was set to allow partial updates in the module definition.

But this also emptied my textboxes that filled the javascript function, which is not desired.

So I need an update panel in the module instead of around the whole module.  As best I can find, the proper code for that is as follows:

 

                DotNetNuke.Framework.AJAX.RegisterScriptManager();

                DotNetNuke.Framework.AJAX.WrapUpdatePanelControl(this.CONTROLNAME, true);

 

The control I'm attempting to wrap is a GridView, and I want it to trigger the panel when the gridview is being sorted... the closest I've come is this line, but it doesn't cause the update panel postback to ever be triggered - instead, the entire page refreshes.

DotNetNuke.Framework.AJAX.RegisterPostBackControl(this.CONTROLNAME);

So how do I make the Sort action of a GridView be the postback trigger for an update panel in dnn?

Thanks again........................................

 

EDIT:

I've also tried going through each control in the GridView and registering them separately, but that also doesn't work.

                foreach (Control objControl in this.CONTROLNAME.Controls)

                {

                    DotNetNuke.Framework.AJAX.RegisterPostBackControl(objControl);

                }

 
New Post
6/30/2009 10:33 AM
 

With your post it is a bit unclear what you are trying to accomplish.

RegisterPostBackControl is used to BYPASS an AJAX operation.

If you wrap a gridview in an update panel, all actions for that gridview will only update that update panel.  HOWEVER NOTE that you MUST call the DNN wrap update panel code on EVERY Page_Load not just when not a postback.


-Mitchel Sellers
Microsoft MVP, ASPInsider, DNN MVP
CEO/Director of Development - IowaComputerGurus Inc.
LinkedIn Profile

Visit mitchelsellers.com for my mostly DNN Blog and support forum.

Visit IowaComputerGurus.com for free DNN Modules, DNN Performance Tips, DNN Consulting Quotes, and DNN Technical Support Services
 
New Post
6/30/2009 1:04 PM
 

 Thank you, Mitch.

I've taken to just putting my UpdatePanel on the page itself, which is what I wanted to do to begin with... 

For some reason, I'd had problems in the past with manually putting update panels in controls... this is far far far far better than trying to use the dnn hack-stuff to make it work.

 

I just wanted a control divided in halves... the top half would remain static and the bottom half would update. (the only async postback triggers were to be the sorting of the GridView)  This all seems to work now by just placing the UpdatePanel directly on the page.

 

Thank you again for the reply!

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0GridView Sort event as PostBack triggerGridView Sort event as PostBack trigger


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