Intersoft WebDesktop Documentation
ShowActionDropdown Property
See Also  Example Send Feedback
ISNet.WebUI.WebDesktop Namespace > WebNotification Class : ShowActionDropdown Property


Glossary Item Box

Specifies whether action dropdown button is displayed.

Syntax

Visual Basic (Declaration) 
Public Property ShowActionDropdown As Boolean
Visual Basic (Usage)Copy Code
Dim instance As WebNotification
Dim value As Boolean
 
instance.ShowActionDropdown = value
 
value = instance.ShowActionDropdown
C# 
public bool ShowActionDropdown {get; set;}

Remarks

Using this property you can enable action context menu on WebNotification. Action context menu provides a way for end users to access a list of available actions and perform an action against notification event. The Action context menu takes advantage of Hybrid Menu architecture and Visual Menu Builder for design consistency and enhanced integrated development experience.

To enable action context menu, simply set the ShowActionDropdown to true then defines the menu items. You can also manipulate the action menu items programmatically at client side, such as during OnActionClick client side event.

Example

The following example shows you how to use action context menu in WebNotification. You need to create a WebService page in the same directory. (For instance, name it NotificationService.asmx, then it will automatically create NotificationService.cs in the App_code folder).The codes below is used GetNotifications method in WebService. To learn more please refer to Using Action Context Menu in See Also section.
C#Copy Code
[WebMethod]
public WebNotificationEventCollection GetNotifications(WebNotificationEventArgs e)
{
        WebNotificationEventCollection collection = new WebNotificationEventCollection();
        WebNotificationEvent evnt = new WebNotificationEvent();

        evnt.CaptionText = "Samples";
        evnt.ContentText = "Hello world from WebNotification!\nCurrent time is:" + DateTime.Now.ToLongTimeString();        

        collection.Notifications = new WebNotificationEvent[] { evnt };
        return collection;
}
In addition to the codes above, you also need to add client side script for OnClick event to use action context menu in WebNotification.
JScriptCopy Code
<script language="javascript" type="text/javascript">
        function doClick(mi)
        {
                alert("Clicked : " + mi.Name);
        }
</script>

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© 2012 Intersoft Solutions Corp. All Rights Reserved.