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

RadComboBox scrolling problem in IE8

1 Answer 112 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Johnathan
Top achievements
Rank 1
Johnathan asked on 05 Aug 2010, 08:26 PM
This may or may not be your problem as it only occurs using IE8, not IE7 or Firefox.  On the other hand, it only seems to happen with the RadComboBox, so I thought I'd bring it to your attention just in case.

I'm using ASP.NET 3.5 and when I select an item in a combobox, it changes the contents of a related combobox and label field.  I'm using the RadAjaxManager in it's simplest for for this.  The problem is that in IE8, it scrolls to the top of the page, and you have to scroll down to the control again as the page is longer than the screen. (The MaintainPositionOnScrollBack page directive has no effect)  To get around this, I have put in an ugly javascript hack to set the scroll position when the combobox is opened, and then update the scroll position in the ClientEvents property of the AjaxManager to the previous position.  This works, but causes a brief flicker.  I was wondering if you had a more elegant solution.

<script type="text/javascript">
      // Ugly hack
    var nonIEScrollPosition = 0;
    var IEScrollPosition = 0;
    function setScrollPosition(sender, args)
    {
        nonIEScrollPosition = document.body.scrollTop;
        IEScrollPosition = document.documentElement.scrollTop;
    }
    function updateScrollPosition(sender, args)
    {
        document.body.scrollTop = nonIEScrollPosition;
        document.documentElement.scrollTop = IEScrollPosition;
    }
</script>
<telerik:RadAjaxManager ID="ajaxManager" runat="server">
    <ClientEvents OnRequestStart="updateScrollPosition"></ClientEvents>
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="ddlTMS">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="ddlBuNo" LoadingPanelID="radLoadingPanel" />
                <telerik:AjaxUpdatedControl ControlID="lblCostCenter" LoadingPanelID="radLoadingPanel" />
            </UpdatedControls>

The control is defined as so:

<telerik:RadComboBox ID="ddlTMS" Skin="Simple" DataTextField="TypeModelSeriesID" DataValueField="TypeModelSeriesID"
    OnClientDropDownOpening="setScrollPosition" AutoPostBack="true" runat="server"></telerik:RadComboBox>
<asp:CustomValidator ID="cvTMS" Display="Dynamic" ControlToValidate="ddlTMS" ValidationGroup="Save" EnableClientScript="false"
    OnServerValidate="CheckTMS" runat="server"></asp:CustomValidator>

1 Answer, 1 is accepted

Sort by
0
Accepted
Simon
Telerik team
answered on 06 Aug 2010, 01:36 PM
Hello Johnathan,

We fixed this issue recently, so you can download the latest internal build and upgrade to obtain the fixed version.

Greetings,
Simon
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
ComboBox
Asked by
Johnathan
Top achievements
Rank 1
Answers by
Simon
Telerik team
Share this question
or