﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebGrid Enterprise - how can i customize operation for ContextMenu in WebGrid?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/how-can-i-customize-operation-for-ContextMenu-in-WebGrid/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>how can i customize operation for ContextMenu in WebGrid?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/how-can-i-customize-operation-for-ContextMenu-in-WebGrid/</link><pubDate>Mon, 09 Aug 2010 23:32:00 GMT</pubDate><dc:creator>qq397472251</dc:creator><description>&lt;p&gt;thank you&lt;/p&gt;</description></item><item><title>how can i customize operation for ContextMenu in WebGrid?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/how-can-i-customize-operation-for-ContextMenu-in-WebGrid/</link><pubDate>Mon, 09 Aug 2010 21:42:51 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui', 'sans-serif'; color: #1f497d; font-size: 9pt"&gt;The snippet code below shows how to add a menu, My Menu, in WebGrid’s row context menu.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;span style="font-family: 'courier new'; color: blue; font-size: 9pt"&gt;function&lt;/span&gt; WebGrid1_OnRowContextMenu(controlId, rowType, rowElement, menuObject) {
    &lt;span style="font-family: 'courier new'; color: blue; font-size: 9pt"&gt;var&lt;/span&gt; separator = &lt;span style="font-family: 'courier new'; color: blue; font-size: 9pt"&gt;new&lt;/span&gt; WebMenuItem();
    separator.Type = &lt;span style="font-family: 'courier new'; color: #a31515; font-size: 9pt"&gt;"Separator"&lt;/span&gt;;
    separator.Name = &lt;span style="font-family: 'courier new'; color: #a31515; font-size: 9pt"&gt;"MySeparator"&lt;/span&gt;;

    &lt;span style="font-family: 'courier new'; color: blue; font-size: 9pt"&gt;var&lt;/span&gt; menuItem = &lt;span style="font-family: 'courier new'; color: blue; font-size: 9pt"&gt;new&lt;/span&gt; WebMenuItem();
    menuItem.Text = &lt;span style="font-family: 'courier new'; color: #a31515; font-size: 9pt"&gt;"View Row's KeyValue"&lt;/span&gt;;
    menuItem.Name = &lt;span style="font-family: 'courier new'; color: #a31515; font-size: 9pt"&gt;"MyMenu"&lt;/span&gt;;
    menuItem.OnClick = &lt;span style="font-family: 'courier new'; color: #a31515; font-size: 9pt"&gt;"RowKeyValue"&lt;/span&gt;;

    &lt;span style="font-family: 'courier new'; color: green; font-size: 9pt"&gt;//Add Menu Separator and Menu Item&lt;/span&gt;
    menuObject.Items.Add(separator);
    menuObject.Items.Add(menuItem);

    &lt;span style="font-family: 'courier new'; color: blue; font-size: 9pt"&gt;return true&lt;/span&gt;;
}

&lt;span style="font-family: 'courier new'; color: blue; font-size: 9pt"&gt;function&lt;/span&gt; RowKeyValue() {
    &lt;span style="font-family: 'courier new'; color: blue; font-size: 9pt"&gt;var&lt;/span&gt; WebGrid1 = ISGetObject(&lt;span style="font-family: 'courier new'; color: #a31515; font-size: 9pt"&gt;"WebGrid1"&lt;/span&gt;);
    &lt;span style="font-family: 'courier new'; color: blue; font-size: 9pt"&gt;var&lt;/span&gt; key = WebGrid1.GetSelectedObject().GetRowObject().KeyValue;

    alert(key);

    &lt;span style="font-family: 'courier new'; color: blue; font-size: 9pt"&gt;return true&lt;/span&gt;;
}&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui', 'sans-serif'; color: #1f497d; font-size: 9pt"&gt;The complete sample is enclosed as attachment. Hope this helps.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>how can i customize operation for ContextMenu in WebGrid?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/how-can-i-customize-operation-for-ContextMenu-in-WebGrid/</link><pubDate>Sun, 08 Aug 2010 21:56:43 GMT</pubDate><dc:creator>qq397472251</dc:creator><description>&lt;p&gt;for example:&lt;/p&gt;
&lt;p&gt;i want to customize an operation(add()) for ContextMenu!&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;function add()&lt;/p&gt;
&lt;p&gt;{....}&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;how can i add "add()" to ContextMenu?&lt;/p&gt;</description></item></channel></rss>