﻿<?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 - Replace Export File Entirely</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Replace-Export-File-Entirely/</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>Replace Export File Entirely</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Replace-Export-File-Entirely/</link><pubDate>Fri, 08 Jun 2012 04:59:51 GMT</pubDate><dc:creator>Hans</dc:creator><category>export</category><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Yes it is possible to run your scenario.&lt;br /&gt;I suggest you to modify the item in export context menu with new menu item.&lt;br /&gt;And set the menu item’s event as you please.&lt;/p&gt;
&lt;p&gt;You could modify the export context menu item in OnExportContextMenu client side event of WebGrid.&lt;br /&gt;Here’s the example snippet code that perhaps you could use.&lt;/p&gt;&lt;pre&gt;function WebGrid1_OnExportContextMenu(controlId, table, menu, location) {
    var WebGrid1 = ISGetObject(controlId);
            
    // Clear all default Export Context Menu
    menu.ClearAll();

    // Create new menu item
    var menuItem = new WebMenuItem();
    menuItem.Text = "My Menu Item";
    menuItem.Name = "MyMenu";
    menuItem.OnClick = "NewFile";

    // Add Menu Item    
    menu.Items.Add(menuItem);

    return true;
}

function NewFile() {
    alert("Your new file");
}&lt;/pre&gt;

&lt;p&gt;I attached the example sample, that implement customize export context menu, as well.&lt;/p&gt;
&lt;p&gt;Hope this helps. Thank you.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item><item><title>Replace Export File Entirely</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Replace-Export-File-Entirely/</link><pubDate>Thu, 07 Jun 2012 21:31:40 GMT</pubDate><dc:creator>questica</dc:creator><category>export</category><description>&lt;p&gt;We have some grids in our application that we've developed a special excel export for.  Rather than have a separate button outside the grid to run these exports, I'd like to catch the export event from the grid and just replace the file with a totally different file.  That way users can keep using the export button they have been using all along.  Is that possible?&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 10pt; "&gt;Thanks for your help!&lt;/span&gt;&lt;/p&gt;</description></item></channel></rss>