﻿<?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 - Add a context menu item to past and save</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Add-a-context-menu-item-to-past-and-save/</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>Add a context menu item to past and save</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Add-a-context-menu-item-to-past-and-save/</link><pubDate>Thu, 26 Jan 2012 04:14:15 GMT</pubDate><dc:creator>neil.turner@ntd.co.uk</dc:creator><category>context menu paste save</category><description>&lt;p&gt;Hi&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Thanks for that, apologies, I wasn't very clear in my initial question.&lt;/p&gt;
&lt;p&gt;It's the Paste and Save functionality I need as I don't know how to trigger those events and can't find it in the documentation, the server side functionality for doing the work is in place i just need to know how to call Paste and Save from the client side.&lt;/p&gt;</description></item><item><title>Add a context menu item to past and save</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Add-a-context-menu-item-to-past-and-save/</link><pubDate>Wed, 25 Jan 2012 21:01:37 GMT</pubDate><dc:creator>yudi</dc:creator><category>context menu paste save</category><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui', 'sans-serif'; color: #1f497d; font-size: 9pt"&gt;In order to add a menu item in WebGrid’s row context menu, please try to use following approach.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;function WebGrid1_OnRowContextMenu(controlId, rowType, rowElement, menuObject)
{
    var WebGrid1 = ISGetObject(controlId);
    var separator = new WebMenuItem();
    separator.Type = "Separator";
    separator.Name = "MySeparator";

    var menuItem = new WebMenuItem();
    menuItem.Text = "Paste and Save";
    menuItem.Name = "MyMenu";
    menuItem.OnClick = "PasteandSave";

    // Add Menu Separator and Menu Item    
    menuObject.Items.Add(separator);
    menuObject.Items.Add(menuItem);

    return true;
}

function PasteandSave()
{
    var grid = ISGetObject("WebGrid1");
    //implement the paste and save logic in here
}&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui', 'sans-serif'; color: #1f497d; font-size: 9pt"&gt;After the context menu appearing and user click the “Paste and Save” menu item, “PasteandSave()” function will be invoked. You will need to implement the logic of paste and save scenario in here.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui', 'sans-serif'; color: #1f497d; font-size: 9pt"&gt;Hope this helps.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Add a context menu item to past and save</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Add-a-context-menu-item-to-past-and-save/</link><pubDate>Wed, 25 Jan 2012 12:15:12 GMT</pubDate><dc:creator>neil.turner@ntd.co.uk</dc:creator><category>context menu paste save</category><description>&lt;p&gt;Hi&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;I want to be able to copy a row in a WebGrid then paste it and save it in one click rather than having to right click for context menu, left click to paste, right click for context menu and left click to save &lt;/p&gt;
&lt;p&gt;So I'm looking at adding a 'Paste and Save' item to the context menu, how can I do that?&lt;/p&gt;</description></item></channel></rss>