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.
If (Page.ClientScript.IsClientScriptBlockRegistered(strJSName) = False) Then
ScriptManager.RegisterClientScriptBlock(Page, GetType(DDLAvailableTables), strJSName, strJS, True)
End If
yzidell
Member
620 Points
422 Posts
DropDownExtender hover
Jun 12, 2008 12:22 AM|LINK
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
dwhite
Star
8990 Points
1423 Posts
Re: DropDownExtender hover
Jun 12, 2008 12:42 AM|LINK
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
Latest Blog Post: BDD with ASP.NET MVC and Cucumber
yzidell
Member
620 Points
422 Posts
Re: DropDownExtender hover
Jun 12, 2008 02:20 AM|LINK
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
dwhite
Star
8990 Points
1423 Posts
Re: DropDownExtender hover
Jun 12, 2008 05:12 PM|LINK
Look about half way down on this post: http://forums.asp.net/p/1201162/2161341.aspx
-Damien
Latest Blog Post: BDD with ASP.NET MVC and Cucumber
dwhite
Star
8990 Points
1423 Posts
Re: DropDownExtender hover
Jun 12, 2008 05:17 PM|LINK
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
Latest Blog Post: BDD with ASP.NET MVC and Cucumber
yzidell
Member
620 Points
422 Posts
Re: DropDownExtender hover
Jun 13, 2008 03:18 PM|LINK
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
dwhite
Star
8990 Points
1423 Posts
Re: DropDownExtender hover
Jun 13, 2008 04:57 PM|LINK
Did you copy the code exactly? It worked fine for me with that code. Are you missing a ScriptManager reference?
-Damien
Latest Blog Post: BDD with ASP.NET MVC and Cucumber
yzidell
Member
620 Points
422 Posts
Re: DropDownExtender hover
Jun 13, 2008 07:19 PM|LINK
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
dwhite
Star
8990 Points
1423 Posts
Re: DropDownExtender hover
Sep 08, 2008 12:52 PM|LINK
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
Latest Blog Post: BDD with ASP.NET MVC and Cucumber