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 ForumsClientAPIClientAPIDNNTextSugges - PopulateOnDemand not firingDNNTextSugges - PopulateOnDemand not firing
Previous
 
Next
New Post
2/22/2010 8:02 AM
 
private DNNTextSuggest GenerateSchoolSuggest()
        {
           DNNTextSuggest dtsSchool = new DNNTextSuggest();
            dtsSchool.PopulateOnDemand += dtsSchool_PopulateOnDemand;
          
            return dtsSchool;
        }
 private void dtsSchool_PopulateOnDemand(object source, DNNTextSuggestEventArgs e)
        {
            PopulateList(e.Nodes, e.Text);
        }
 TableRow schoolSuggestRow = GenerateTableRow(2);
            schoolSuggestRow.Cells[0].Controls.Add(new Label { ID = "lblSchoolSuggest", Text = "School" });
            DNNTextSuggest schoolSuggest = GenerateSchoolSuggest();            schoolSuggestRow.Cells[1].Controls.Add(schoolSuggest);
schoolData.Rows.Add(schoolSuggestRow);

 

As seen in the above code, I tried creating a suggest control and adding the event to it. Afterwards, I add it to the page (in this case put it in a tablerow and the table is added to the page). However, no matter what I try, the event is never triggered.

Any insight as to why? If I just drag the control onto a page and connect the event, things work. Does that mean one cannot use this control dynamically?

 
New Post
2/22/2010 9:30 AM
 

Try setting the following property

CallbackType=ProcessPage

This post covers what is going on.


 
New Post
2/22/2010 11:24 AM
 

private DNNTextSuggest GenerateSchoolSuggest()
        {
            DNNTextSuggest dtsSchool = new DNNTextSuggest();
            dtsSchool.CallBackType = DotNetNuke.UI.Utilities.ClientAPICallBackResponse.CallBackTypeCode.ProcessPage;
            dtsSchool.PopulateOnDemand += dtsSchool_PopulateOnDemand;
            dtsSchool.AutoPostBack = true;

            return dtsSchool;
        }

        private void dtsSchool_PopulateOnDemand(object source, DNNTextSuggestEventArgs e)
        {
            throw new NotImplementedException();
            //PopulateList(e.Nodes, e.Text);
        }

I set the callback to processpage instead of simple, but it still doesn't seem to trigger.

 
New Post
2/23/2010 10:03 AM
 

The sample listed in the post mentioned shows the control working in a dynamically created control within a grid.  I would download the source to the controls and compare notes.


 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsClientAPIClientAPIDNNTextSugges - PopulateOnDemand not firingDNNTextSugges - PopulateOnDemand not firing


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