Grid Context Menu XML

This is used to set up the context menus that are displayed when a user right mouse clicks on an item within the grid.

Columns

A string value that represents the grid columns that will be accessed and used within the Link node. Each column specified must be separated by a "|" and therefore must not contain either a "|" or "’" in their name. The column is referenced by Column Member name and not display/caption name.

Example: Column1|Column2|Column3|ID

Confirm

Causes an alert window to pop up when a context menu item is chosen, requiring the user to confirm their choice.

Options: True, False

Default: False

ConfirmText

A string value that is displayed in the Confirm alert window.

ID

A string value used in JavaScript to identify the context menu in the grid. This must be unique for each context menu item and must not contain any special characters, including spaces.

Image

A string value which is a URL to the image that will displayed next to the text of the item in the context menu. The size of the image should be 16x16.

IncludeSource

If this is activated, the context menu URL will include "?Source=" and the current page URL where the grid resides. Do not use this option if the link you are connecting to exists outside of the current site collection.

Options: True, False

Default: False

Example:

<Menu>

<Item>

<ID>PriorityFormDisplay</ID>

<OpenInNewWindow>False</OpenInNewWindow>

<ValueType>Text</ValueType>

<Confirm>False</Confirm>

<ConfirmText>Are You Sure?</ConfirmText>

<Link>priorityform.aspx?cwformtype=display&amp;id=%PKPriority_ID%</Link>

<Columns>PKPriority_ID</Columns>

<Image>../PMImages/view.png</Image>

<Text>Display Priority</Text>

<IncludeSource>True</IncludeSource>

</Item>

<Item>…</Item>

</Menu>

Link

A string value that is linked when a context menu item is chosen. To include content from one of the columns displayed in the grid, wrap the Column Member name in a % and specify that column name in the "Columns" node.

Example: http://site.com/default.aspx?id=%ID%

javascript: mymethod();

OpenInNewWindow

Causes a new window to open when a context menu item is chosen.

Options: True, False

Default: False

ValueType

Controls whether or not the foreground text or the background value is collected when the "Columns" node is specified. (Value is currently unsupported – Future Feature)

Options: Text, Value

Default: Text

Text

A string value which is the text that will be displayed to the user when they activate the context menu.

Back to Top