Problem with scrolling div inside of an update panel

Last post 08-17-2006 10:39 AM by hallem. 17 replies.

Sort Posts:

  • Re: Problem with scrolling div inside of an update panel

    08-16-2006, 7:51 PM
    • Member
      22 point Member
    • khawari519
    • Member since 08-15-2006, 5:05 AM
    • Posts 10
    any chance that i can get the cut and paster version :)
  • Re: Problem with scrolling div inside of an update panel

    08-17-2006, 10:25 AM
    • Member
      380 point Member
    • jrblack10
    • Member since 06-19-2002, 10:42 PM
    • NC - US
    • Posts 96
    I just went through the same/similar problem with an UpdatePanel inside an auto scrolling DIV tag, every click of a tree node, scrolled the content to the top of the tree.  Here is what I found...  I had my style information in an external style class (width, height, overflow).  I took the style information out of the style class and put it "in-line" with the DIV tag and all worked fine.

    <div id=pnlObjChoice_Tree class="" style="overflow:auto; width: 220px; height: 190px;">
    <cc2:UpdatePanel ID="tvObjectTree_UpdatePanel" runat="server">
        <ContentTemplate>
            <asp:TreeView ID="tvObjectTree" runat="server"
                            EnableClientScript="False"
                            PopulateNodesFromClient="False"
                            Visible=true
                            ShowLines="true"
                            ShowExpandCollapse="true"
                            AutoGenerateDataBindings="False"
                            ExpandImageUrl="/Images/cfolder.gif"
                            CollapseImageUrl="/Images/ofolder.gif"
                            NodeIndent="15"
                            OnTreeNodePopulate="tvObjectTree_TreeNodePopulate"
                            OnSelectedNodeChanged="tvObjectTree_SelectedNodeChanged"
                            OnTreeNodeCollapsed="tvObjectTree_TreeNodeCollapsed"
                            OnTreeNodeExpanded="tvObjectTree_TreeNodeExpanded"
                            NodeStyle-CssClass="treeData"
                            SelectedNodeStyle-CssClass="treeDataSelected"
                            HoverNodeStyle-CssClass="treeDataHover">
                </asp:TreeView>
            </ContentTemplate>
    </cc2:UpdatePanel>
    </div>

    For more information:
    http://jblack.wordpress.com/2006/08/18/atlas-div-css-and-auto-scroll/

    Jim
    ----------------------
  • Re: Problem with scrolling div inside of an update panel

    08-17-2006, 10:39 AM
    • Member
      75 point Member
    • hallem
    • Member since 06-09-2006, 1:12 PM
    • Bayside, NY
    • Posts 20
    As it remains right now it should work with the CSS in a seperate file as well there might be some other conflicts on your page that are causing the trouble for you.  But if you notice one of the main differences is your scrolling div is outside the update panel.  What we're trying to get is one that works inside an update panel that also maintains the scroll postition... All attempts at least for me have been thwarted so far...
Page 2 of 2 (18 items) < Previous 1 2