﻿<?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 do I set the AllowExport property server side?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/AllowExport/</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 do I set the AllowExport property server side?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/AllowExport/</link><pubDate>Thu, 05 Jul 2012 22:11:51 GMT</pubDate><dc:creator>bernard</dc:creator><description>&lt;div&gt;&lt;div&gt;Hi Jocelyn,&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you want to hide some menu from context menu, you can do this in OnRowContextMenu client-side event. You can't do this in server-side because this event happens while user interact with WebGrid. You can add this code in OnRowContextMenu event:&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;pre&gt;function regDataGrid_OnRowContextMenu(controlId, rowType, rowElement, menuObject)
{
	var regDataGrid = ISGetObject(controlId);
	menuObject.Items.GetNamedItem("mnuCopyCell").Hide(); //Hide Copy Cell menu
	menuObject.Items.GetNamedItem("mnuCopyRow").Hide(); //Hide Copy Row menu
	menuObject.Items.GetNamedItem("mnuCopyTable").Hide(); //Hide Copy Row menu
	return true;
}&lt;/pre&gt;&lt;/div&gt;
&lt;div&gt;Hope this helps,&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;Regards,&lt;/div&gt;
&lt;div&gt;Bernard&lt;/div&gt;
&lt;div&gt;&lt;p /&gt;&lt;/div&gt;</description></item><item><title>How do I set the AllowExport property server side?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/AllowExport/</link><pubDate>Thu, 05 Jul 2012 12:15:52 GMT</pubDate><dc:creator>jcrendulic</dc:creator><description>&lt;p&gt;Thank yo uthat worked.  I also have another question....&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;How do I hide the "Copy this Table" from showing up when you right click on the grid?  I would also like to do this from the code behind page as well.&lt;/p&gt;</description></item><item><title>How do I set the AllowExport property server side?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/AllowExport/</link><pubDate>Tue, 03 Jul 2012 23:32:22 GMT</pubDate><dc:creator>bernard</dc:creator><description>Hi Jocelyn,&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;I think the problem is on the syntax. You can try this syntax and put it to your code:&lt;/div&gt;
&lt;div&gt;&lt;pre&gt;if (UserRights().Export.ToLower() == "false")
	regDataGrid.LayoutSettings.AllowExport = ISNet.WebUI.WebGrid.Export.No;
else
	regDataGrid.LayoutSettings.AllowExport = ISNet.WebUI.WebGrid.Export.Yes;&lt;/pre&gt;&lt;p&gt;For your information, I recommend you to put this syntax on OnInitializeLayout event.&lt;/p&gt;&lt;p&gt;Hope this helps.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Regards,&lt;/p&gt;&lt;p&gt;Bernard&lt;/p&gt;&lt;/div&gt;</description></item><item><title>How do I set the AllowExport property server side?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/AllowExport/</link><pubDate>Tue, 03 Jul 2012 11:30:16 GMT</pubDate><dc:creator>jcrendulic</dc:creator><description>&lt;p&gt;I want to set the AllowExport property of the LayoutSettings serverside.  How do I do this?  I have tried something like this below but it does not work.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;span style="font-family: 'times new roman','serif'; font-size: 12pt; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"&gt;&lt;pre style="font-family: consolas; background: white; color: black; font-size: 13px"&gt;&lt;span style="color: blue"&gt;if&lt;/span&gt;&amp;nbsp;(UserRights().Export.ToLower()&amp;nbsp;==&amp;nbsp;&lt;span style="color: #a31515"&gt;"false"&lt;/span&gt;) regDataGrid.RootTable.AllowExport&amp;nbsp;=&amp;nbsp;&lt;span style="color: #a31515"&gt;"No"&lt;/span&gt;;
else regDataGrid.RootTable.AllowExport&amp;nbsp;=&amp;nbsp;&lt;span style="color: #a31515"&gt;"Yes"&lt;/span&gt;;&lt;/pre&gt;&lt;/span&gt;</description></item></channel></rss>