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

Ajaxupdatedcontrol grid linkbutton causes error

1 Answer 26 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Dennis
Top achievements
Rank 1
Dennis asked on 06 Jan 2011, 05:36 PM
I have a user control, DuplicateVinDisplay.ascx, which has a rad grid wtih a linkbutton column. The linkbutton column, when clicked, will call a javascript function that will open a radwindow and display another page. This all was working perfectly when I loaded the user control on page load.

But, I need to display the user control when the user tabs out of a textbox on the page the user control is hosted on. So, I added the following to my RadAjaxManager on the hosting page:

 

<telerik:AjaxSetting AjaxControlID="VINTextBox">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="DuplicateVINDisplay1" LoadingPanelID="defaultRadAjaxLoadingPanel"/>
</UpdatedControls>
</telerik:AjaxSetting>

 

This does what I need it to and the user control displays properly when the user tabs our of the VINTextBox control. However, now when I click the linkbutton in the grid, I get a javascript Object Expected error. I have even modified the javascript funtion that is being called to simply be an alert('hi'); but to no avail.

What might I be missing here?

1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 12 Jan 2011, 08:21 AM
Hello Dennis,

Could you confirm that you are correctly loading the dynamic user control, as described in this help article which elaborates on RadAjax and user controls:
Load user controls

Additionally, you should not make a declarative AJAX setting if the control is not always visible on the page. Try adding the setting programmatically in Page_Load or Page_PreRender when you are sure that the user control will be visible on the page.

Kind regards,
Tsvetina
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
Ajax
Asked by
Dennis
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or