﻿<?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 - Automatically Accept Batch Update</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Automatically-Accept-Batch-Update/</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>Automatically Accept Batch Update</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Automatically-Accept-Batch-Update/</link><pubDate>Wed, 01 Aug 2012 06:28:02 GMT</pubDate><dc:creator>Hans</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;Basically the type of data source and method parameter doesn’t take any affect to my code. Could you provide a simple sample that replicate your issue? So i can help you investigate this issue further more.&lt;br /&gt;&lt;br /&gt;I made a another simple to demonstrate how to delete multiple row using button and or context menu. In this sample, I use batch update to True.&lt;br /&gt;I use AcceptAllChanges() function to apply all changes without click “Accept All Changes” button in WebGrid.&lt;br /&gt;&lt;br /&gt;Here this snippet code in WebButton’s OnClientClick client side event:&lt;br /&gt;&lt;/p&gt;&lt;pre&gt;function WebButton1_OnClientClick(controlId, parameter) {    var WebButton1 = ISGetObject(controlId);    var WebGrid1 = ISGetObject("WebGrid1");
    var checkedRows = WebGrid1.RootTable.GetCheckedRows();
    for (var i = 0; i &amp;lt; checkedRows.length; i&amp;#43;&amp;#43;) {
        WebGrid1.RootTable.ToRowObject(checkedRows[i]).Delete();
    }
    WebGrid1.AcceptAllChanges();
    return true;
}&lt;/pre&gt;
&lt;p&gt;And I set a validation in WebGrid’s OnAddPendingChanges() client side event:&lt;/p&gt;&lt;pre&gt;function WebGrid1_OnAddPendingChanges(controlId, table, rowChange) {
    var WebGrid1 = ISGetObject("WebGrid1");
    if (rowChange.RowState == "Deleted") {
        window.setTimeout(function () { WebGrid1.AcceptAllChanges(); }, 10);
    }
    return true;
}&lt;/pre&gt;
&lt;p&gt;Please have review on my sample. Thank you.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Hans.&lt;br /&gt;&lt;/p&gt;
</description></item><item><title>Automatically Accept Batch Update</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Automatically-Accept-Batch-Update/</link><pubDate>Tue, 31 Jul 2012 12:30:16 GMT</pubDate><dc:creator>adajani@najiasystems.com</dc:creator><description>- Same webgrid as above. &lt;br /&gt;&lt;br /&gt;- I'm binding to an ObjectDataSource. &lt;br /&gt;&lt;br /&gt;- Creating the columns dynamically in Server Side InitializeLayout event (I have 80&amp;#43; columns).&lt;br /&gt;&lt;br /&gt;- My delete method takes two paramters.&lt;br /&gt;&lt;br /&gt;- No checkboxes&lt;br /&gt;&lt;br /&gt;I want to be able to select as many columns (1 or more), right click to Delete from the ContextMenu or from an outside button on the page somewhere and delete all selected rows.&lt;br /&gt;</description></item><item><title>Automatically Accept Batch Update</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Automatically-Accept-Batch-Update/</link><pubDate>Tue, 31 Jul 2012 05:58:51 GMT</pubDate><dc:creator>Hans</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;That supposedly doesn’t affect my code.&lt;br /&gt;&lt;br /&gt;Could you provide me more information about your code/your scenario that you want to achieve?&lt;br /&gt;Or could you provide me a simple sample that replicate your issue?&lt;br /&gt;&lt;br /&gt;Perhaps I can help you to investigate your issue on my end.&lt;br /&gt;&lt;br /&gt;Thank you.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Hans.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Automatically Accept Batch Update</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Automatically-Accept-Batch-Update/</link><pubDate>Mon, 30 Jul 2012 11:14:46 GMT</pubDate><dc:creator>adajani@najiasystems.com</dc:creator><description>Hans,&lt;br /&gt;&lt;br /&gt;I tried implementing the attached, but it did not work. The only difference I see in our code is I have 2 paramters for my delete function in my object data source. Does that affect it?&lt;br /&gt;&lt;br /&gt;I can step through the JS code in my debugger and everything seems to work just fine, but the wor never gets deleted from the grid. I refresh the page to see if the changes go through but it doesn't. I also tried adding a refreshGrid() call, but that also didn't work.&lt;br /&gt;&lt;br /&gt;Please advise. Thanks.&lt;br /&gt;</description></item><item><title>Automatically Accept Batch Update</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Automatically-Accept-Batch-Update/</link><pubDate>Mon, 30 Jul 2012 03:52:35 GMT</pubDate><dc:creator>Hans</dc:creator><description>Hello,&lt;br /&gt;&lt;br /&gt;I made a simple sample that perhaps similar with your scenario.&lt;br /&gt;I bind WebGrid to access data source control (Northwind.mdb and Shippers table).&lt;br /&gt;&lt;br /&gt;I attached my sample. Please have review on my sample and let me hear your response.&lt;br /&gt;&lt;br /&gt;Thank you.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Hans.&lt;br /&gt;&lt;br /&gt;</description></item><item><title>Automatically Accept Batch Update</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Automatically-Accept-Batch-Update/</link><pubDate>Fri, 27 Jul 2012 10:16:59 GMT</pubDate><dc:creator>adajani@najiasystems.com</dc:creator><description>Yes I do.&lt;br /&gt;&lt;br /&gt;How can I delete multiple rows without using Batch Update using "Delete Selection" ?&lt;br /&gt;</description></item><item><title>Automatically Accept Batch Update</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Automatically-Accept-Batch-Update/</link><pubDate>Thu, 26 Jul 2012 23:59:17 GMT</pubDate><dc:creator>Hans</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;I’m glad to hear that you have achieved your goal.&lt;br /&gt;Should you have further question, please do not hesitate to contact us.&lt;br /&gt;&lt;br /&gt;Thank you.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Hans.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Automatically Accept Batch Update</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Automatically-Accept-Batch-Update/</link><pubDate>Thu, 26 Jul 2012 10:59:52 GMT</pubDate><dc:creator>adajani@najiasystems.com</dc:creator><description>Hi Hans,&lt;br /&gt;&lt;br /&gt;Thanks for the reply. This is not quite what I was going for, but I understand now what I am trying to achieve is not possible. My end goal was to be able to delete multiple rows at the same time without having to click "Accept Changes". &lt;br /&gt;&lt;br /&gt;Now I set Batch Update to FALSE, and have a delete method specified in my ObjectDataSource. If I select multiple rows, and choose "Delete Selection", it only deletes one row. I'd like to be able to delete all selected.&lt;br /&gt;&lt;br /&gt;Thanks.&lt;br /&gt;</description></item><item><title>Automatically Accept Batch Update</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Automatically-Accept-Batch-Update/</link><pubDate>Mon, 23 Jul 2012 23:34:32 GMT</pubDate><dc:creator>Hans</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;Thank you for your code.&lt;br /&gt;&lt;br /&gt;I’ve made a simple sample using your code. However, I don’t get any prompt when I try to apply changes.&lt;br /&gt;I bind WebGrid with access data source control (Northwind.mdb database &amp; Shippers table).&lt;br /&gt;&lt;br /&gt;Please have a review on my sample &amp; video, then let me hear your response.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Hans.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Automatically Accept Batch Update</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Automatically-Accept-Batch-Update/</link><pubDate>Mon, 23 Jul 2012 19:58:56 GMT</pubDate><dc:creator>adajani@najiasystems.com</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I'd like to make the grid automatically accept batch update changes. My code is below. From the settings, it seems that it should, but it doens't. I always get the prompt in the status bar to accept pending changes. Everything deletes fine when I accept changes.&lt;br /&gt;&lt;/p&gt;&lt;pre&gt;&amp;lt;ISWebGrid:WebGrid ID="myGrid" runat="server" Height="560px" Width="100%" UseDefaultStyle="true" EnableWebResources="Always"
                           DataSourceID="odsAccountLineList" CustomSchemaRetrieval="UseWebGrid"&amp;gt;
            &amp;lt;RootTable GridLineStyle="NotSet" DataKeyField="account_line_id"&amp;gt;
            &amp;lt;/RootTable&amp;gt;
            &amp;lt;LayoutSettings DisplayDetailsOnUnhandledError="true"
                            InProgressUIBehavior="ChangeCursorToHourGlass" StatusBarVisible="true"
                            NewRowLostFocusAction="AlwaysUpdate"
			                RowLostFocusAction="AlwaysUpdate" 
                            AllowColumnMove="Yes"
			                AllowFilter="No" 
                            AllowGrouping="No" 
                            AllowSelectColumns="Yes" 
                            AllowSorting="No"
			                GroupByBoxVisible="false" 
                            AutoHeight="false" 
                            AutoWidth="true" 
                            PagingMode="None"
                            AllowEdit="Yes" 
                            AllowDelete="Yes"
                            AllowMultipleSelection="Yes"
                            UseRelativePositioning="true"
                            AllowBatchUpdate="true"&amp;gt;
                &amp;lt;BatchUpdateSettings 
                    AutomaticObjectUpdate="true" 
                    AllowReviewChanges="false" 
                    AllowUndoChanges="false" 
                    NotifyOnLostFocus="false" 
                    PromptOnUndoAllChanges="false" 
                    PromptUnsavedChanges="false" /&amp;gt;
                &amp;lt;AlternatingRowStyle CustomRules="text-overflow: ellipsis; overflow-x: hidden" BackColor="LightGray" Wrap="false" Font-Size="8pt" Font-Names="Arial Monospaced"&amp;gt;&amp;lt;/AlternatingRowStyle&amp;gt;
                &amp;lt;RowStyle CustomRules="text-overflow: ellipsis; overflow-x: hidden" BackColor="White" Font-Size="8pt" Wrap="false" Font-Names="Arial Monospaced"&amp;gt;&amp;lt;/RowStyle&amp;gt;
                &amp;lt;ClientSideEvents OnRowContextMenu="myGrid_OnRowContextMenu" OnColumnContextMenu="myGrid_OnColumnContextMenu" 
                    OnAfterInitialize="myGrid_OnAfterInitialize"/&amp;gt;
		    &amp;lt;/LayoutSettings&amp;gt;
        &amp;lt;/ISWebGrid:WebGrid&amp;gt;&lt;/pre&gt;
&lt;p&gt;Thanks.&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>