﻿<?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 - Upgrading old webgrid 3.5 to latest webgrid</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Upgrading-old-webgrid-35-to-latest-webgrid/</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>Upgrading old webgrid 3.5 to latest webgrid</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Upgrading-old-webgrid-35-to-latest-webgrid/</link><pubDate>Wed, 01 Jul 2015 09:07:42 GMT</pubDate><dc:creator>yudi</dc:creator><category>Webgrid upgrade</category><description>&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Apologize for the delay in sending this.&lt;/span&gt;&lt;/p&gt;&lt;blockquote&gt;I would assume row.Update() would trigger the server side event&lt;/blockquote&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;I created a simple sample of WebGrid. The grid has OnAddRow, OnDeleteRow, OnInitializeDataSource, and OnUpdateRow event handlers which will handles the query of add, delete, select, and update respectively.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Within the page, a button is added. This button will do the following:&lt;/span&gt;&lt;/p&gt;
&lt;ol style="color: #1f497d;"&gt;&lt;li&gt;Select the first row of grid's root table.&lt;/li&gt;&lt;li&gt;Edit the cells of selected row.&lt;/li&gt;&lt;li&gt;Update the changes by invoking Update() method.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;The whole action is done using onclick of the button (see snippet code below).&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;&amp;lt;input id="button1" type="button" value="Select First Row and Update" onclick="EditFirstRow()" /&amp;gt;

&amp;lt;script type="text/javascript"&amp;gt;
    function EditFirstRow()
    {
        var grid = ISGetObject("WebGrid1");
        var row = grid.RootTable.GetRow(0); // get the first row in RootTable
        var cells = row.GetCells(); // get WebGridCell collection

        row.Select(); // select the row

        // populate new row object     
        cells.GetNamedItem("CustomerID").SetText("INTER", true);
        cells.GetNamedItem("CompanyName").SetText("Intersoft Solutions", true);
        ...

        row.Update(); // insert new record

        return true;
    }
&amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Update() method will invoke OnUpdateRow event at the server side. I enclosed my simple sample for your reference.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Please have the sample evaluated on your end and let me know if you have different result.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Upgrading old webgrid 3.5 to latest webgrid</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Upgrading-old-webgrid-35-to-latest-webgrid/</link><pubDate>Fri, 19 Jun 2015 14:49:47 GMT</pubDate><dc:creator>p.belanger@cgi.com</dc:creator><category>Webgrid upgrade</category><description>&lt;p&gt;Hi Yudi,&lt;/p&gt;&lt;p&gt;This is what the 3.5 document says about wgPrepareUpdateRow:&lt;/p&gt;&lt;p&gt;// invoke&lt;span color="#ffffff" style="background-color: rgb(51, 153, 255);"&gt;UpdateRow&lt;/span&gt; 
event at the server side&lt;br&gt; // and also refresh griddata display at the 
client side&lt;br&gt; wgPrepareUpdateRow(grid);&lt;br&gt;&lt;/p&gt;&lt;span size="2"&gt;&lt;p&gt;
I tried to replace to code with: &lt;/p&gt;&lt;p&gt;var grid = ISGetObject('wgrdABCD');&lt;br&gt;var row = grid.GetSelectedObject().GetRowObject();&lt;br&gt;row.Update();&lt;br&gt;&lt;/p&gt;&lt;p&gt;	&lt;/p&gt;&lt;p&gt;I would assume row.Update() would trigger the server side event&lt;/p&gt;&lt;p&gt;Private Sub wgrdABCD_UpdateRow(ByVal sender As Object, ByVal e As ISNet.WebUI.WebGrid.RowEventArgs) Handles wgrdLHSC.UpdateRow&lt;/p&gt;&lt;p&gt;But UpdateRow is not called. &lt;/p&gt;&lt;p&gt;Any idea?&lt;/p&gt;&lt;p&gt;Thanks&lt;br&gt;&lt;/p&gt;&lt;/span&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;</description></item><item><title>Upgrading old webgrid 3.5 to latest webgrid</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Upgrading-old-webgrid-35-to-latest-webgrid/</link><pubDate>Fri, 19 Jun 2015 10:43:51 GMT</pubDate><dc:creator>p.belanger@cgi.com</dc:creator><category>Webgrid upgrade</category><description>&lt;p&gt;Hi Yudi,&lt;/p&gt;&lt;p&gt;I was aware of the 2 articles but as you alread know they do not explain what "wgPrepareUpdateRow" is doing or what it should be replaced by.&lt;/p&gt;&lt;p&gt;It is used when the user saves the new row.&lt;/p&gt;&lt;p&gt;This is the javascript function:&lt;br&gt;&lt;/p&gt;&lt;p&gt;function SavePage()&lt;br&gt;{&lt;br&gt;var grid = wgGetGridById("wgrdABCD");&lt;br&gt;if (grid.getSelectedObject() != null)&lt;br&gt;{&lt;br&gt;var rowElm = grid.getSelectedObject().getRowElement();&lt;br&gt;var cell = grid.getActiveEditCell(); &lt;br&gt;wgHighlightEditCell(cell);&lt;br&gt;cell.cellModified = true;&lt;br&gt;wgHighlightRow(rowElm); &lt;br&gt;wgPrepareUpdateRow(grid);&lt;br&gt;return true;&lt;br&gt;}&lt;br&gt;}&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;Thanks&lt;br&gt;&lt;/p&gt;</description></item><item><title>Upgrading old webgrid 3.5 to latest webgrid</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Upgrading-old-webgrid-35-to-latest-webgrid/</link><pubDate>Fri, 19 Jun 2015 03:32:11 GMT</pubDate><dc:creator>yudi</dc:creator><category>Webgrid upgrade</category><description>&lt;blockquote&gt;Do you have a document which would give the old and new syntax?&lt;/blockquote&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;I found these two articles in WebGrid documentation:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="color: #1f497d;"&gt;&lt;li&gt;&lt;a href="http://www.intersoftpt.com/Support/WebGrid/Documentation/topic17.html" target="_blank"&gt;Upgrading from previous version&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.intersoftpt.com/Support/WebGrid/Documentation/topic23.html" target="_blank"&gt;Switching to new Client Side API&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;blockquote&gt;One example is the client side JavaScript code "wgPrepareUpdateRow"&lt;/blockquote&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Unfortunately, I can't help you by informing the new client-side API of wgPrepareUpdateRow. Could you please inform me about the usage of this method? or provide a simple sample which uses this method? Maybe I can start from this point to find the current one.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Upgrading old webgrid 3.5 to latest webgrid</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Upgrading-old-webgrid-35-to-latest-webgrid/</link><pubDate>Thu, 18 Jun 2015 14:03:57 GMT</pubDate><dc:creator>p.belanger@cgi.com</dc:creator><category>Webgrid upgrade</category><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;We are currently in the process of upgrading our old WebGrid 3.5 to the latest version.&lt;/p&gt;&lt;p&gt;We would need to replace obsolete syntax with the current one. Do you have a document which would give the oldand new syntax.&lt;/p&gt;&lt;p&gt;One example is the  client side javascript code "wgPrepareUpdateRow".&lt;/p&gt;&lt;p&gt;What would be the equivalent to Webgrid 9.&lt;/p&gt;&lt;p&gt;Thanks&lt;/p&gt;&lt;span color="#008000" size="2"&gt;&lt;span color="#008000" size="2"&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;/span&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;/span&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;</description></item></channel></rss>