After asyn-postback (OnEntryAdded event), page is scrolling to some other location

5 posts, 0 answers
  1. Julia
    Julia avatar
    3 posts
    Member since:
    Sep 2013

    Posted 09 Mar 2015 Link to this post

    Hello,

    I have a content page where I have RadAutoCompleteBox with Token mode.

    <telerik:RadAutoCompleteBox ID="rCitation" runat="server" Width="350px" MaxResultCount="20"
                        MinFilterLength="2" InputType="Token" TextSettings-SelectionMode="Multiple" OnClientEntryAdding="OnClientEntryAddingHandler"
                        AllowCustomEntry="true" WebServiceSettings-Path="~/AutoComplete.aspx" WebServiceSettings-Method="SearchAutoCompleteCitation" 
                        OnEntryAdded="rtb_EntryAdded" />

    On Entry Added, I am trying to auto populate another control asynchronously. for that I have added the following AjaxSetting.

    <telerik:AjaxSetting AjaxControlID="ractCitation" EventName="EntryAdded">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rtbCaseName" LoadingPanelID="RadAjaxLoadingPanel1">
                    </telerik:AjaxUpdatedControl>
                </UpdatedControls>
    </telerik:AjaxSetting>

    After adding a token, the async event is fired. However, after returning from async-callback, my pages is scrolling in such way that the autocompletebox comes to the bottom.

    Interestingly, I have nother dropdownlist with similar behavior. But, the page position is intact after async-callback. The issue is with only autocompletebox.

    Any solution?




    SS









  2. Julia
    Julia avatar
    3 posts
    Member since:
    Sep 2013

    Posted 09 Mar 2015 in reply to Julia Link to this post

    Correction: (rCitation is the control name)

    <telerik:AjaxSetting AjaxControlID="rCitation" EventName="EntryAdded">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rtbCaseName" LoadingPanelID="RadAjaxLoadingPanel1">
                    </telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 11 Mar 2015 Link to this post

    Hi Julia,

    What is the other control? Why don't you populate it on the client?

    Regards,
    Hristo Valyavicharski
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  5. Julia
    Julia avatar
    3 posts
    Member since:
    Sep 2013

    Posted 16 Mar 2015 in reply to Hristo Valyavicharski Link to this post

    1) RadAutoCompleteBox would show a list fetched from the webservice. (as given in webservice settings).
    2) User may select an entry from it.
    3) Based on the selected value (On EntryAdded event), we have to go back asynchronously to fetch some info from DB and show it on a RadTextBox.

    If i dont use (<telerik:AjaxSetting AjaxControlID="ractCitation" EventName="EntryAdded">), but another RadButton to trigger async call, it works fine. Only with radautocompletebox with EntryAdded event, I am seeing the page scrolling down, which irritates!
  6. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 19 Mar 2015 Link to this post

    Hi Julia,

    if the method is asynchronous:

    public async void UpdateTextBoxAsync()
    {
        rtbCaseName.Text = "updated";   
    }

    try to make the page asynchronous too:

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" Async="true" %>


    Regards,
    Regards,
    Hristo Valyavicharski
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017