﻿<?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 Context-Menu won't work</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-Context-Menu-wont-work/</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 Context-Menu won't work</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-Context-Menu-wont-work/</link><pubDate>Tue, 01 Jul 2014 03:16:12 GMT</pubDate><dc:creator>yudi</dc:creator><category>ContextMenu</category><category>WegbGrid</category><description>&lt;blockquote&gt;&lt;p&gt;  Here's what I've tried, and the problems each solution is presenting.&lt;/p&gt;&lt;p&gt;1. Create my own context menu, and attach to the WebGrid. (KB:&lt;a href="http://www.intersoftpt.com/Support/WebGrid/KBArticle/Create-your-own-specific-row-context-menu-on-WebGrid/" target="_blank"&gt;http://www.intersoftpt.com/Support/WebGrid/KBArticle/Create-your-own-specific-row-context-menu-on-WebGrid/&lt;/a&gt;)&lt;/p&gt;&lt;p&gt;  a. The sample downloaded from the page will show the context-menu on upper-left corner on Chrome, FireFox and Safari. Won't show anything on IE.&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;I modify the sample downloaded from the page in order to resolve the above problems. The detail is as follow.&lt;/span&gt;&lt;/p&gt;
&lt;ul style="color: #1f497d;"&gt;&lt;li&gt;Set MenuWindowType property of WebContextMenu control to Normal.&lt;/li&gt;&lt;li&gt;Modify doctype of the page (implement html5 doctype).&lt;/li&gt;&lt;li&gt;Set RenderingMode property of WebGrid and WebContextMenu control to HTML5 (adopt nowaday doctype supported by modern browsers).&lt;/li&gt;&lt;li&gt;Modify WebGrid1_OnRowContextMenu JS function.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;The context menu is now showing correctly in IE, Chrome, Firefox, and Safari.&lt;/span&gt;&lt;/p&gt;
&lt;img src="http://www.intersoftpt.com/Community/Attachments/4048/IE%2011.png" alt="Create your own specific row context menu on WebGrid" style="height: 314px; width: 560px;"&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;I enclosed the modified sample, SpecificRowContextMenuOnWebGrid_Modified.zip, and enclosed them as attachment.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Please have the sample evaluated on your and let me know if you have different result.&lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;  b. When it opens up in the wrong place, I click the option I want to activate and it won't do anything. My code was updated to have an OnMenuItemClicked event coded. AutoPostBostBack is set to "Yes". The event is not called on the server-side&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;The breakpoint that added in OnMenuItemClicked server-side event got hit when I click any WebContextMenuItem. The AutoPostBack property has been enabled on the above sample to meet this requirement. Please let me know if you still have any difficulties to call the event on the server-side.&lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;2. Tried to change the built-in context menu of the grid (KB:http://www.intersoftpt.com/Support/WebGrid/Tutorial/Text/Customize-Context-Menu/ ) &lt;/p&gt;&lt;p&gt;  a. There are options that won't even detect the mouse-hover to change the option style&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;I created a sample, CustomizeContextMenu.aspx, by following the step-by-step shown in the Customize Context Menu knowledge base article. The options detects the mouse-hover to change the option style.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Please find the attached sample, CustomizeContextMenu.zip, and let me know whether this helps or not.&lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;  b. Clicking on any option won't call any client-side nor server-side event. I need server-side, but couldn't even make an "alert('Hello world');" to work here.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;I didn't implement this scenario on CustomizeContextMenu sample. Please refer to SpecificRowContextMenuOnWebGrid_Modified sample which already has the AutoPostback property enabled.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Hope this help.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>WebGrid Context-Menu won't work</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-Context-Menu-wont-work/</link><pubDate>Fri, 27 Jun 2014 11:04:43 GMT</pubDate><dc:creator>nacpretty@hotmail.com</dc:creator><category>ContextMenu</category><category>WegbGrid</category><description>&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;p&gt;Good day,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;I'm trying to enable a custom ContextMenu on my WebGrid and it simply won't work.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; Goal: context-menu to show an "edit" option, which will open an ajaxToolkit ModalPopup allowing me to edit the row (there is more info in this window than presentable in the grid, so editing the grid cells is not enough). Clicking "Ok" on the modalPopup will save the object and update the database. I'm using customObject, not ISDataSource or anything like that.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Here's what I've tried, and the problems each solution is presenting.&lt;/p&gt;&lt;p&gt;1. Create my own context menu, and attach to the WebGrid. (KB:&amp;nbsp;&lt;a tabindex="-1" href="http://www.intersoftpt.com/Support/WebGrid/KBArticle/Create-your-own-specific-row-context-menu-on-WebGrid/" style="font-size: 10pt;"&gt;http://www.intersoftpt.com/Support/WebGrid/KBArticle/Create-your-own-specific-row-context-menu-on-WebGrid/&lt;/a&gt;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; a. The sample downloaded from the page will show the context-menu on upper-left corner on Chrome, FireFox and Safari. Won't show anything on IE.&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; b. When it opens up in the wrong place, I click the option I want to activate and it won't do anything. My code was updated to have an&amp;nbsp;OnMenuItemClicked event coded. AutoPostBostBack is set to "Yes". The event is not called on the server-side&lt;/p&gt;&lt;p&gt;2. Tried to change the built-in context menu of the grid (KB:&amp;nbsp;http://www.intersoftpt.com/Support/WebGrid/Tutorial/Text/Customize-Context-Menu/ ) &amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; a. There are options that won't even detect the mouse-hover to change the option style&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; b. Clicking on any option won't call any client-side nor server-side event. I need server-side, but couldn't even make an "alert('Hello world');" to work here.&lt;/p&gt;&lt;p&gt;3. Added a ButtonColumn and tried to make it work from there&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; a. The effect is ugly and un-wanted, but it calls the server side events. But the ajaxToolkit modalPopup simply will not show up. I'm using the server-side "Show()" method to show it and it won't work&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; b. I isolated the ModalPopup panel in a new page, added a button a called the "Show()" method on the server side from it, and it worked as expected. Made me think the problem is associated with the WebGrid.&lt;/p&gt;&lt;p&gt;One favor I ask: if you're providing help here, please do attach sample codes so I can see what you see. I've browsed through some posts and people suggest lots of things and the discussion goes for over 1 week until they find out it's something simple in the code that was not provided. I don't want to lose two or three weeks to solve something potentially simple.&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Thank you very much&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;D&lt;/p&gt;</description></item></channel></rss>