locked
How to make DropDownExtender box and arrow always visible RRS feed

  • Question

  • User1972028140 posted

    Is there a way to make the DropDownExtender's box always visible?

    Having a label that you mouse over to see the arrow and box appear is not intuitive AT ALL. No one would ever know just by looking at the page that there is some form of functionality to it.

    Friday, January 4, 2008 2:04 PM

Answers

  • User2050624116 posted

    Here's a script workaround. In my case I only display the overlay when the control has focus, but you could call the hover at pageLoad and again after unhover if you want to make the dropdown overlay always visible.

     

            txtHedgingType.Attributes.Add("onfocus", "$find('" + ddeHedgingType.BehaviorID + "')._dropWrapperHoverBehavior_onhover();");
            txtHedgingType.Attributes.Add("onblur", "$find('" + ddeHedgingType.BehaviorID + "')._dropWrapperHoverBehavior_onunhover();");

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 8, 2008 6:10 AM

All replies

  • User222791821 posted

    Hi,

    Thank you for your post!

    I think that if you want keep it always visible, you should not use DropDownExtender.

    I suggest you use AlwaysVisibleControl

    Best Regards,

    Thursday, January 10, 2008 7:48 AM
  • User1972028140 posted

    I think you misunderstood the question.

    I want the box around the text and the drop down arrow to always be visible, not just when someone mouses over it.  The functionality of DropDownExtender is ass backwards....  It only displays the box and arrow when you hover over the text, how is anyone supposed to know that there is functionality there?

    My current work around was copying all the HTML generated by the DropDownExtender which is displayed during hover and placed it around the ASP.NET label, but that is the wrong way to go about doing it....

    DropDownExtender should have a DisplayMode = Hover or Always... not for the panel or control it displays when clicked, but for indication that there is something to click on.

     This functionality I cannot find, whether I look through the code or the documentation or these forums....
     

    Thursday, January 17, 2008 4:38 PM
  • User2050624116 posted

    Here's a script workaround. In my case I only display the overlay when the control has focus, but you could call the hover at pageLoad and again after unhover if you want to make the dropdown overlay always visible.

     

            txtHedgingType.Attributes.Add("onfocus", "$find('" + ddeHedgingType.BehaviorID + "')._dropWrapperHoverBehavior_onhover();");
            txtHedgingType.Attributes.Add("onblur", "$find('" + ddeHedgingType.BehaviorID + "')._dropWrapperHoverBehavior_onunhover();");

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 8, 2008 6:10 AM
  • User2050624116 posted

    ...and if you want it to always show the dropdown overlay (not only when the extended control has focus) then this will do it:

     

    function someControlID_pageLoad()
    {
      $find('someControlID_ddeDropdownExtender').unhover = doNothing;
      $find('someControlID_ddeDropdownExtender')._dropWrapperHoverBehavior_onhover();
    }
    function doNothing() {}

    Sys.Application.add_load(someControlID_pageLoad);

    Thursday, February 14, 2008 3:05 AM
  • User910419807 posted

    you can also use a dropdownlist or html select with runat=server instead of a label. dropdown will always be visible.

    Monday, February 18, 2008 9:48 AM
  • User-1885969533 posted

    Is there a workaround to make the arrow always visible but not the arrow highlight color?  Or at least add an identical arrow to the label in the exact position as the hover arrow?

    Monday, March 31, 2008 4:43 PM
  • User-84974713 posted

    hi,

    I am not able to make DropDownExtender always visible.I used the same line of code with just putting my control ids,nothing works.. 

    Can you send me the code lines , just want to see where i miss.

     

    Thanks,

    Vicky.

    Tuesday, July 29, 2008 4:18 PM
  • User2050624116 posted

    Make sure you emit the behavior ID from the server - that way it will work if your control is inside any type of naming container, master page etc. If you hardcode it in client side code you need to take care to handle any container name prefixes.

    Thursday, July 31, 2008 12:57 AM
  • User-319159958 posted

    in this post of yours you say something about using a dropdown control instead of a label for the driopdownextender control.

    I was wandering how you get the text to display in the dropdown? which property you use for the text of the selection to be displayed as the selection that was made..

    Also have you found a way for the dropdown to look exactly like the extender looks like when hovered? I mean the same css ans style because I only get the default style of the dropdown o display

    Monday, August 11, 2008 7:32 PM
  • User90788576 posted

    Thank you.... That was very Usefull

    Friday, September 30, 2011 4:34 AM