This is a migrated thread and some comments may be shown as answers.

Handling Postback in UserControl in RadMenuItem?

1 Answer 82 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Software
Top achievements
Rank 1
Software asked on 11 May 2011, 07:04 PM

I'm using the RadMenu to show different UserControls, which are basically forms, that cause a PostBack when the buttons within them are clicked.  I had been using RadToolTips for these, but thought the RadMenu treatment looked better.  Now I'm wondering if maybe RadMenus aren't meant to be used this way?

Anyways, the problem I'm having is that whenever I execute a PostBack in the usercontrol, which is embedded in a RadMenuItem, it doesn't do a PostBack, and there is some Javascript error in the ScriptResource.axd that causes the page to become unstable - none of the controls seem to work after that until I reload the page.  I do have all of the RadMenus within an UpdatePanel, so Ajax is enabled and being used.  When I replace these menu items with tooltips, with the same usercontrols embedded within them, the postbacks DO work, so I'm just wondering if there is something I need to do in the command for these buttons because they are embedded in a RadMenuItem?  Here's an example of the code I use to add the UserControl to the RadMenuItem:

var followUp = menuSourceControl.FindItemByText("FollowUpScreen");
if(followUp != null)
{
    var followUpForm = LoadControl("~/controls/popups/FollowUpForm.ascx");
    ((FollowUpForm)followUpForm).RID = rid;
    followUp.Controls.Add(followUpForm);                
}

I couldn't find any mention or example of this on the site, but would welcome any guidance on this.

Thanks!
Eddie

1 Answer, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 17 May 2011, 10:44 AM
Hi Eddie,

Since it is not a trivial scenario, can you please open a support ticket and send us a sample project that exemplifies the issue that you describe?

Kind regards,
Kate
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Menu
Asked by
Software
Top achievements
Rank 1
Answers by
Kate
Telerik team
Share this question
or