DropDownExtender hover

Last post 09-08-2008 8:52 AM by dwhite. 8 replies.

Sort Posts:

  • DropDownExtender hover

    06-11-2008, 8:22 PM
    • Member
      534 point Member
    • yzidell
    • Member since 07-24-2002, 1:48 PM
    • Posts 278

    I would like to have my dropdownextender in Hover mode (when you mouse over, it looks like a real drop down).

    Would you know how to do this?

    thanks 

  • Re: DropDownExtender hover

    06-11-2008, 8:42 PM
    • Star
      8,978 point Star
    • dwhite
    • Member since 02-08-2007, 9:25 AM
    • Bristol, CT
    • Posts 1,422

    I don't have the exact code, but you should be able to override the default animation for OnHide and OnShow to just always have it visible.  Refer to the DropDown Sample (the Properties section), Using Animations, and the Animation Reference.

     Hope this helps,
    -Damien

     

    Visoft, Inc - Home | Blogs

    Latest Blog Post: Silverlight DataBinding Bug
  • Re: DropDownExtender hover

    06-11-2008, 10:20 PM
    • Member
      534 point Member
    • yzidell
    • Member since 07-24-2002, 1:48 PM
    • Posts 278

    There is nothing in the properties that would allow for this.

    It is not an animation.

    I just want the DropDownExtender to appear as a reqular drop down list.

    Can you help me ????

    thanks 

  • Re: DropDownExtender hover

    06-12-2008, 1:12 PM
    • Star
      8,978 point Star
    • dwhite
    • Member since 02-08-2007, 9:25 AM
    • Bristol, CT
    • Posts 1,422

    Look about half way down on this post: http://forums.asp.net/p/1201162/2161341.aspx

    -Damien

     

    Visoft, Inc - Home | Blogs

    Latest Blog Post: Silverlight DataBinding Bug
  • Re: DropDownExtender hover

    06-12-2008, 1:17 PM
    • Star
      8,978 point Star
    • dwhite
    • Member since 02-08-2007, 9:25 AM
    • Bristol, CT
    • Posts 1,422

    I added a blog post that has the full solution, you can find it here: http://blogs.visoftinc.com/archive/2008/06/12/AJAX-Control-Toolkit-DropDownExtender-Always-Visible.aspx

    -Damien

    Visoft, Inc - Home | Blogs

    Latest Blog Post: Silverlight DataBinding Bug
  • Re: DropDownExtender hover

    06-13-2008, 11:18 AM
    • Member
      534 point Member
    • yzidell
    • Member since 07-24-2002, 1:48 PM
    • Posts 278

    Hi Damien,

    Thanks for responding writing a blog post.

    I am trying out the code - but I am getting a javascript error message:

    'Sys' is undefined.

    Thanks
     

  • Re: DropDownExtender hover

    06-13-2008, 12:57 PM
    • Star
      8,978 point Star
    • dwhite
    • Member since 02-08-2007, 9:25 AM
    • Bristol, CT
    • Posts 1,422

    Did you copy the code exactly?  It worked fine for me with that code.  Are you missing a ScriptManager reference?

    -Damien

    Visoft, Inc - Home | Blogs

    Latest Blog Post: Silverlight DataBinding Bug
  • Re: DropDownExtender hover

    06-13-2008, 3:19 PM
    • Member
      534 point Member
    • yzidell
    • Member since 07-24-2002, 1:48 PM
    • Posts 278

    Hi Damien,

    I do have a scriptmanager reference.

    here is my code:

    Dim strJS As String = "" 

    'other Javascript stuff that already works......... 

    strJS += "function " + Me.ClientID.ToString + "_pageLoad() { "
    strJS += "$find('" + Me.ddeDDLAvailableTables.BehaviorID + "').unhover = doNothing; "
    strJS += "$find('" + Me.ddeDDLAvailableTables.BehaviorID + "')._dropWrapperHoverBehavior_onhover(); "
    strJS += "}"
    strJS += "function doNothing() {} "

    strJS += "Sys.Application.add_load(" + Me.ClientID.ToString + "_pageLoad); "

    If (Page.ClientScript.IsClientScriptBlockRegistered(strJSName) = False) Then
            ScriptManager.RegisterClientScriptBlock(Page, GetType(DDLAvailableTables), strJSName, strJS, True)
    End If


    The DropDownExtender is in a usercontrol.

    Thanks for helping 

  • Re: DropDownExtender hover

    09-08-2008, 8:52 AM
    • Star
      8,978 point Star
    • dwhite
    • Member since 02-08-2007, 9:25 AM
    • Bristol, CT
    • Posts 1,422

    If you look at the code, it's using the ID of the DropDownExtender:

        function DropDownExtender1_pageLoad()
        {
          $find('DropDownExtender1').unhover = doNothing;
          $find('DropDownExtender1')._dropWrapperHoverBehavior_onhover();
        }
        function doNothing() {}

        Sys.Application.add_load(DropDownExtender1_pageLoad);

    And here's tht extender:        
    <cc1:dropdownextender id="DropDownExtender1" TargetControlID="Label1"
               
    DropDownControlID="DropPanel1" runat="server">
            </
    cc1:dropdownextender>

    Notice it isn't the BehaviorID.

    Hope this helps,
    -Damien

    Visoft, Inc - Home | Blogs

    Latest Blog Post: Silverlight DataBinding Bug
Page 1 of 1 (9 items)