﻿<?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 - Webgrid 7 add to ContextMenu</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid-7-add-to-ContextMenu/</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>Webgrid 7 add to ContextMenu</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid-7-add-to-ContextMenu/</link><pubDate>Thu, 16 Sep 2010 08:48:52 GMT</pubDate><dc:creator>RolfArndt</dc:creator><category>Add custom events to ContextMenu in Webgrid 7</category><description>&lt;p style="text-align: left;"&gt;Thx alot for your reply :)&lt;/p&gt;&lt;p style="text-align: left;"&gt;I got it to work with your example:&lt;/p&gt;&lt;pre&gt;function WebGrid1_OnColumnContextMenu(controlId, col, menu, isGroup, location)
        {
            var separator = new WebMenuItem();    
            separator.Type = "Separator";       
            separator.Name = "MySeparator";          
            var menuItemGem = new WebMenuItem();    
            menuItemGem.Text = "Save Layout";    
            menuItemGem.Name = "LayoutSave";    
            menuItemGem.OnClick = "SaveLayoutValue";
            
            var menuItemGendan = new WebMenuItem();    
            menuItemGendan.Text = "Get Default Layout";    
            menuItemGendan.Name = "DefaultLayout";    
            menuItemGendan.OnClick = "DefaultLayoutValue";
            // Add Menu Separator and Menu Item    
            menu.Items.Add(separator);    
            menu.Items.Add(menuItemGem);
            menu.Items.Add(menuItemGendan);
        }
	
	    function SaveLayoutValue() {
            var grid = ISGetObject("WebGrid1");
            var key = "LayoutSave" //
            grid.AddInput("key", key);
            grid.SendCustomRequest();
        }
        function DefaultLayoutValue() {
            var grid = ISGetObject("WebGrid1");
            var key = "LayoutDefault"
            grid.AddInput("key", key);
            grid.SendCustomRequest();
        }&lt;/pre&gt;
&lt;p&gt;Serverside it calls:&lt;/p&gt;&lt;pre&gt;    Private Sub WebGrid1_InitializePostBack(ByVal sender As System.Object, ByVal e As ISNet.WebUI.WebGrid.PostbackEventArgs) Handles WebGrid1.InitializePostBack
        If Not e.Action &amp;lt;&amp;gt; ISNet.WebUI.WebGrid.PostBackAction.Custom Then
            Select Case Request("key")
                Case "LayoutSave"&amp;nbsp;                    &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ucASPLPGridLayoutCtl.GridLayoutOptions(Request("key"))
                Case "DefaultLayout"
                    ucASPLPGridLayoutCtl.GridLayoutOptions(Request("key"))
                    Response.Redirect(Request.Url.ToString)
            End Select
        End If
    End Sub&lt;/pre&gt;
&lt;p&gt;And its working.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Best Regards Rolf&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Webgrid 7 add to ContextMenu</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid-7-add-to-ContextMenu/</link><pubDate>Thu, 16 Sep 2010 00:48:24 GMT</pubDate><dc:creator>niven</dc:creator><category>Add custom events to ContextMenu in Webgrid 7</category><description>&lt;p&gt;Hi Rolf,&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;If you still want to use the default ContextMenu, you can add via clientside and use a SendCustomRequest function to handle a serverside function.&lt;/p&gt;
&lt;p&gt;I have attach s sample for your scenario.&lt;/p&gt;
&lt;p&gt;Hope this help and have a nice day.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Niven Prasetya&lt;/p&gt;</description></item><item><title>Webgrid 7 add to ContextMenu</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid-7-add-to-ContextMenu/</link><pubDate>Wed, 15 Sep 2010 04:45:19 GMT</pubDate><dc:creator>RolfArndt</dc:creator><category>Add custom events to ContextMenu in Webgrid 7</category><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I was wondering if anyone could attach an example of how I can add:&lt;/p&gt;
&lt;p&gt;Add something to the ContextMenu when on click does something serverside (See Attached img).&lt;/p&gt;
&lt;p&gt;I have searched for some while for an example but all the relevant links are forwarding to your Support side which are down :(&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Thx in advance&lt;/p&gt;
&lt;p&gt;Best Regards Rolf&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>