Ajaxupdatedcontrol grid linkbutton causes error

2 posts, 0 answers
  1. Dennis
    Dennis avatar
    23 posts
    Member since:
    Nov 2008

    Posted 06 Jan 2011 Link to this post

    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?
  2. Tsvetina
    Admin
    Tsvetina avatar
    2481 posts

    Posted 12 Jan 2011 Link to this post

    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.
Back to Top