﻿<?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 can I add/Delete row to/from a WebGrid with client event</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-can-I-addDelete-row-tofrom-a-WebGrid-with-client-event/</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 can I add/Delete row to/from a WebGrid with client event</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-can-I-addDelete-row-tofrom-a-WebGrid-with-client-event/</link><pubDate>Mon, 26 Apr 2010 21:24:28 GMT</pubDate><dc:creator>gao3251999</dc:creator><description>&lt;p&gt;Hi,&lt;span style="font-family: 'lucida sans unicode', sans-serif; color: black; font-size: 9pt"&gt;&lt;span style="font-size: 9pt"&gt;Andi &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;thank you&lt;/p&gt;</description></item><item><title>How can I add/Delete row to/from a WebGrid with client event</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-can-I-addDelete-row-tofrom-a-WebGrid-with-client-event/</link><pubDate>Mon, 26 Apr 2010 05:43:05 GMT</pubDate><dc:creator>andi@intersoftpt.com</dc:creator><description>&lt;p /&gt;&lt;p style="margin-top: 7.5pt; margin-right: 0in; margin-bottom: 7.5pt; margin-left: 0in; "&gt;&lt;span style="font-family: 'lucida sans unicode', sans-serif; color: black; font-size: 9pt; "&gt;&lt;span style="font-size: 9pt; "&gt;Hi Gao Xiyin,&lt;o:p /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 7.5pt; margin-right: 0in; margin-bottom: 7.5pt; margin-left: 0in; "&gt;&lt;span style="font-family: 'lucida sans unicode', sans-serif; color: black; font-size: 9pt; "&gt;&lt;span style="font-size: 9pt; "&gt;     Could you kindly go to these thread "&lt;/span&gt;&lt;a href="http://intersoftpt.com/Community/WebGrid/Two-Grid/"&gt;&lt;span style="font-size: 9pt; "&gt;http://intersoftpt.com/Community/WebGrid/Two-Grid/&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 9pt; "&gt;",
I am pretty sure that the attachment that included and provided by my colleague,
is similar to your scenario in here.&lt;o:p /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 7.5pt; margin-right: 0in; margin-bottom: 7.5pt; margin-left: 0in; "&gt;&lt;span style="font-family: 'lucida sans unicode', sans-serif; color: black; font-size: 9pt; "&gt;&lt;span style="font-size: 9pt; "&gt;     I hope it helps. Thank you and have a nice
day.&lt;o:p /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 7.5pt; margin-right: 0in; margin-bottom: 7.5pt; margin-left: 0in; "&gt;&lt;span style="font-family: 'lucida sans unicode', sans-serif; color: black; font-size: 9pt; "&gt;&lt;span style="font-size: 9pt; "&gt;Best Regards,&lt;o:p /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 7.5pt; margin-right: 0in; margin-bottom: 7.5pt; margin-left: 0in; "&gt;&lt;span style="font-family: 'lucida sans unicode', sans-serif; color: black; font-size: 9pt; "&gt;&lt;span style="font-size: 9pt; "&gt;Andi Santoso&lt;o:p /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; "&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-size: 9pt; "&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;&lt;/span&gt;&lt;o:p /&gt;&lt;/p&gt;
&lt;p /&gt;</description></item><item><title>How can I add/Delete row to/from a WebGrid with client event</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-can-I-addDelete-row-tofrom-a-WebGrid-with-client-event/</link><pubDate>Mon, 26 Apr 2010 04:58:47 GMT</pubDate><dc:creator>gao3251999</dc:creator><description>&lt;p&gt;hi,&lt;span style="font-size: 9pt"&gt;Andi ,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt"&gt;thank you for repling,I want to know how can do these two methods when I click a button.for example:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt"&gt;these are two grid:grid1,grid2.The selected&amp;nbsp;&amp;nbsp;row of grid1will be delete from grid1 and add to grid2 when I click a button!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt"&gt;&lt;span style="font-size: 9pt"&gt;Best Regards,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt"&gt;&lt;span style="font-size: 9pt"&gt;yixin Gao&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>How can I add/Delete row to/from a WebGrid with client event</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-can-I-addDelete-row-tofrom-a-WebGrid-with-client-event/</link><pubDate>Mon, 26 Apr 2010 03:50:37 GMT</pubDate><dc:creator>andi@intersoftpt.com</dc:creator><description>&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Hi Gao Yixin,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; To delete a row in WebGrid you can use these following snippet:&lt;/span&gt;&lt;/p&gt;
&lt;p /&gt;&lt;pre&gt;&lt;span style="font-size: 9pt; "&gt;       function Button1_onclick() {
            var grid = ISGetObject("WebGrid1");
            var row = grid.GetSelectedObject().ToRowObject();
            row.Delete();
            
            return true;

        }
&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;To add a row, actually, we will need to insert a default value to our new rows in WebGrid. Here is the snippet:&lt;/span&gt;&lt;/p&gt;
&lt;p /&gt;&lt;pre&gt;&lt;span style="font-size: 9pt; "&gt;        function Button2_onclick() {
            var grid = ISGetObject("WebGrid1");
            var newRowElement = grid.RootTable.GetNewRow();
            var newRow = grid.RootTable.ToRowObject(newRowElement);
            newRow.Select();
            var cells = newRow.GetCells();           
            cells.GetNamedItem("OrderID").SetText("10248", true);           
            cells.GetNamedItem("ProductID").SetText("42", true);
            cells.GetNamedItem("UnitPrice").SetText("1", true);
            cells.GetNamedItem("Quantity").SetText("10", true);
            cells.GetNamedItem("Discount").SetText("0.05", true);


            newRow.SetDataChanged();
            grid.MarkEdit();
         
            return true;
        }
&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I hope it helps. Thank you and have a nice day.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Best Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Andi Santoso&lt;/span&gt;&lt;/p&gt;
&lt;p /&gt;
&lt;p /&gt;</description></item><item><title>How can I add/Delete row to/from a WebGrid with client event</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-can-I-addDelete-row-tofrom-a-WebGrid-with-client-event/</link><pubDate>Sun, 25 Apr 2010 22:28:33 GMT</pubDate><dc:creator>gao3251999</dc:creator><description>&lt;p&gt;How can I add/Delete row to/from a WebGrid with client event&lt;/p&gt;</description></item></channel></rss>