ShowItemCommands Event
Collapse the table of content
Expand the table of content

ObjectList.ShowItemCommands Event

Occurs before the commands related to an item in an ObjectList are shown.

Namespace: System.Web.UI.MobileControls
Assembly: System.Web.Mobile (in system.web.mobile.dll)

public:
event ObjectListShowCommandsEventHandler^ ShowItemCommands {
	void add (ObjectListShowCommandsEventHandler^ value);
	void remove (ObjectListShowCommandsEventHandler^ value);
}
/** @event */
public void add_ShowItemCommands (ObjectListShowCommandsEventHandler value)

/** @event */
public void remove_ShowItemCommands (ObjectListShowCommandsEventHandler value)

In JScript, you can handle the events defined by a class, but you cannot define your own.
Not applicable.

The event argument contains a reference to the item and to the collection of commands. An event handler can customize the collection according to the item. Applications can use the ShowItemCommands event to provide functionality equivalent to item-specific shortcut menus. Changes made to the collection of commands during this event are not persisted.

This event is called after the ItemSelect event is called. You can use this event to perform other tasks before showing the detail view. You can add, remove, or rearrange fields, depending on the item selected in the list view.

The following code example demonstrates how to use the ShowItemCommands event to remove an item from the ObjectListCommandCollection of the detail view of an ObjectList. The item to remove is selected in the list view.

NoteNote:

The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information, see ASP.NET Web Page Code Model.

No code example is currently available or this language may not be supported.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1

Community Additions

ADD
Show:
© 2016 Microsoft