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

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

4 Answers 52 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Julia
Top achievements
Rank 1
Julia asked on 09 Mar 2015, 07:14 AM
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









4 Answers, 1 is accepted

Sort by
0
Julia
Top achievements
Rank 1
answered on 09 Mar 2015, 07:21 AM
Correction: (rCitation is the control name)

<telerik:AjaxSetting AjaxControlID="rCitation" EventName="EntryAdded">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="rtbCaseName" LoadingPanelID="RadAjaxLoadingPanel1">
                </telerik:AjaxUpdatedControl>
            </UpdatedControls>
        </telerik:AjaxSetting>
0
Hristo Valyavicharski
Telerik team
answered on 11 Mar 2015, 02:23 PM
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.

 
0
Julia
Top achievements
Rank 1
answered on 16 Mar 2015, 10:01 AM
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!
0
Hristo Valyavicharski
Telerik team
answered on 19 Mar 2015, 09:57 AM
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.

 
Tags
AutoCompleteBox
Asked by
Julia
Top achievements
Rank 1
Answers by
Julia
Top achievements
Rank 1
Hristo Valyavicharski
Telerik team
Share this question
or