﻿<?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 - Remove selected Items from Grid serverside</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Remove-selected-Items-from-Grid-serverside/</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>Remove selected Items from Grid serverside</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Remove-selected-Items-from-Grid-serverside/</link><pubDate>Mon, 24 Aug 2009 23:54:45 GMT</pubDate><dc:creator>gordont</dc:creator><category>WebGrid</category><category>serverside</category><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have discussed this with our development team they said that it's not possible because WebGrid is naturally designed as an component instance, so each AJAX request should also follow the same discipline. Otherwise, how can the server-side knows which WebGrid is performing refresh (if all requests are combined).&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Gordon Tumewu&lt;/p&gt;</description></item><item><title>Remove selected Items from Grid serverside</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Remove-selected-Items-from-Grid-serverside/</link><pubDate>Fri, 21 Aug 2009 06:41:17 GMT</pubDate><dc:creator>vinsdeon</dc:creator><category>WebGrid</category><category>serverside</category><description>&lt;p&gt;@Gordon:- But my real question is not that. The question is about the heavyload of 5 asynchronous postbacks. Infact the method Rebinddatasource casues the initialisedatasource event to work. So why it cant update the UI. And the rebinddatasource method is not causing no asynchronous postback(if i am right). So is there a way by which i could tell that these are the webgrids need to be refreshed and cause only one asynchronous postback? I mean those webgrids are refreshed at once....&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Remove selected Items from Grid serverside</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Remove-selected-Items-from-Grid-serverside/</link><pubDate>Fri, 21 Aug 2009 06:18:38 GMT</pubDate><dc:creator>gordont</dc:creator><category>WebGrid</category><category>serverside</category><description>&lt;blockquote&gt;&lt;p&gt;@Gordon:- Concider the fact that i have 5 webgrids in my webpage and the user is updating each 5 webgrids. And am doing the save in a single click. But to reflect changes of these webgrids, i have to call the refresh method of these 5 webgrids. Means 5 asynchronous postbacks. That means heavy load. Is there any alternative?&lt;span class="postusername"&gt;&lt;a class="contentlink" href="http://www.intersoftpt.com/Community/Users/gordont/"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Actually it depends on your scenario. &lt;/p&gt;
&lt;p&gt;1. If you edit using inline editing at WebGrid then you didn't need to refresh the grid, because the grid allready get the changes that you do.&lt;/p&gt;
&lt;p&gt;2. You can use our batch update, the user can modify the data at 5 WebGrid that you have and use button click to get all the changes and modify in database. You didn't need to refresh the grid.&lt;/p&gt;
&lt;p&gt;3. If you update the data directly in database, then definetely you need to refresh the grid because WebGrid didn't know which changes has been made in the database without refreshing it.&lt;/p&gt;</description></item><item><title>Remove selected Items from Grid serverside</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Remove-selected-Items-from-Grid-serverside/</link><pubDate>Fri, 21 Aug 2009 06:01:27 GMT</pubDate><dc:creator>vinsdeon</dc:creator><category>WebGrid</category><category>serverside</category><description>&lt;p&gt;@Gordon:- Concider the fact that i have 5 webgrids in my webpage and the user is updating each 5 webgrids. And am doing the save in a single click. But to reflect changes of these webgrids, i have to call the refresh method of these 5 webgrids. Means 5 asynchronous postbacks. That means heavy load. Is there any alternative?&lt;span class="postusername"&gt;&lt;a href="../../Users/gordont/" class="contentlink"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Remove selected Items from Grid serverside</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Remove-selected-Items-from-Grid-serverside/</link><pubDate>Fri, 21 Aug 2009 05:42:16 GMT</pubDate><dc:creator>gordont</dc:creator><category>WebGrid</category><category>serverside</category><description>&lt;blockquote&gt;&lt;p&gt;Infact only Webgrid1.ClientAction.Refresh() is required. First you need to check if this event is working or not. If the refresh is working then page will load once again asynchronously and go through the webgrid initialise event once again and rebinding takes place. If you are getting a postback then you try James's method. And if you are using Webgrid1.ClientAction.Refresh() or &lt;span size="2"&gt;WebGrid1.ClientAction.RefreshAll() then you dont need to apply neither &lt;/span&gt;WebGrid1.ClearCachedDataSource() nor WebGrid1.RebindDataSource()&lt;span size="2"&gt;.&lt;p&gt;Anyway check if the refresh is causing asynchronous postback. And are you using Initialisedatasource event of webgrid? &lt;br /&gt;&lt;/p&gt;&lt;p&gt;It's true, everytime you do WebGrid1.ClientAction.Refresh() then the grid will called the InitializeDataSource event. The important thing is you always need to put your binding method inside InitializeDataSource event, therefore everytime you do Refresh() the InitializeDataSource event triggered.&lt;/p&gt;&lt;p&gt;One more thing RefreshAll used to refresh the data and structure of the grid, if you only need to get the changes in data then you only need to have Refresh()&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Anyway check if the refresh is causing asynchronous postback. And are you using Initialisedatasource event of webgrid? &lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;It's true, everytime you do WebGrid1.ClientAction.Refresh() then the grid will called the InitializeDataSource event. The important thing is you always need to put your binding method inside InitializeDataSource event, therefore everytime you do Refresh() the InitializeDataSource event triggered.&lt;/p&gt;
&lt;p&gt;One more thing RefreshAll used to refresh the data and structure of the grid, if you only need to get the changes in data then you only need to have Refresh()&lt;/p&gt;</description></item><item><title>Remove selected Items from Grid serverside</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Remove-selected-Items-from-Grid-serverside/</link><pubDate>Fri, 21 Aug 2009 04:23:19 GMT</pubDate><dc:creator>vinsdeon</dc:creator><category>WebGrid</category><category>serverside</category><description>&lt;p&gt;Infact only Webgrid1.ClientAction.Refresh() is required. First you need to check if this event is working or not. If the refresh is working then page will load once again asynchronously and go through the webgrid initialise event once again and rebinding takes place. If you are getting a postback then you try James's method. And if you are using Webgrid1.ClientAction.Refresh() or &lt;span size="2"&gt;WebGrid1.ClientAction.RefreshAll() then you dont need to apply neither &lt;/span&gt;WebGrid1.ClearCachedDataSource() nor WebGrid1.RebindDataSource()&lt;span size="2" /&gt;.&lt;/p&gt;&lt;p&gt;Anyway check if the refresh is causing asynchronous postback. And are you using Initialisedatasource event of webgrid? &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Remove selected Items from Grid serverside</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Remove-selected-Items-from-Grid-serverside/</link><pubDate>Thu, 20 Aug 2009 11:49:30 GMT</pubDate><dc:creator>james</dc:creator><category>WebGrid</category><category>serverside</category><description>&lt;p&gt;When your Save function is called via the button, does it perform full postback or AJAX (FlyPostBack)?&lt;/p&gt;
&lt;p&gt;The ClientAction will work only in FlyPostBack context. If your page is using full postback, try to use Page.RegisterClientScriptBlock and emit a javascript function to perform grid's Refresh method in the client side.&lt;/p&gt;
&lt;p&gt;However, for better user experience, I think you may want to try using FlyPostBack mode (this can be easily achieved if you're using Intersoft WebButton control) to delete something in database then refresh the Grid without full page refresh.&lt;/p&gt;
&lt;p&gt;Hope this helps.&lt;/p&gt;</description></item><item><title>Remove selected Items from Grid serverside</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Remove-selected-Items-from-Grid-serverside/</link><pubDate>Thu, 20 Aug 2009 11:22:04 GMT</pubDate><dc:creator>p.kidd@btinternet.com</dc:creator><category>WebGrid</category><category>serverside</category><description>&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Tried both your ideas, looked promising but no effect.&lt;/p&gt;
&lt;p&gt;I also tried the folowing, hoping for some refresh to take place but to no avail.&lt;/p&gt;
&lt;p&gt;Interestingly when I page forward then back the items are gone.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;span size="2"&gt;&lt;p&gt;WebGrid1.ClearCachedDataSource()&lt;/p&gt;&lt;p&gt;WebGrid1.RebindDataSource()&lt;/p&gt;&lt;p&gt;WebGrid1.ClientAction.RefreshAll()&lt;/p&gt;&lt;p&gt;Surely I am just missing a grid refresh or something?&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;/span&gt;</description></item><item><title>Remove selected Items from Grid serverside</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Remove-selected-Items-from-Grid-serverside/</link><pubDate>Thu, 20 Aug 2009 07:57:43 GMT</pubDate><dc:creator>vinsdeon</dc:creator><category>WebGrid</category><category>serverside</category><description>&lt;p&gt;Am using Webgrid1.ClientAction.Refresh() from server side to refresh Webgrid with updated values.This could be done just after your save method. Or try Webgrid1.RebindDatasource(). Am not sure about the second option though....&lt;/p&gt;</description></item><item><title>Remove selected Items from Grid serverside</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Remove-selected-Items-from-Grid-serverside/</link><pubDate>Thu, 20 Aug 2009 07:33:12 GMT</pubDate><dc:creator>p.kidd@btinternet.com</dc:creator><category>WebGrid</category><category>serverside</category><description>&lt;div&gt;&lt;span style="font-size: 10pt; font-family: 'arial','sans-serif'"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-size: 10pt; font-family: 'arial','sans-serif'"&gt;I use the &lt;span style="color: #a31515"&gt;ObjectDataSource&lt;/span&gt; &lt;span style="color: #a31515"&gt;to bind the grid to my business layer.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-size: 10pt; font-family: 'arial','sans-serif'"&gt;&lt;span style="color: #a31515"&gt;My users will filter the returned data and then set the checked row checkbox for multiple entries.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-size: 10pt; font-family: 'arial','sans-serif'"&gt;&lt;span style="color: #a31515"&gt;They then select an external to grid update button to update the database with the changes.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-size: 10pt; font-family: 'arial','sans-serif'"&gt;&lt;span style="color: #a31515"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-size: 10pt; font-family: 'arial','sans-serif'"&gt;&lt;span style="color: #a31515"&gt;I tried webGrid1.databind  server side, but no luck.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-size: 10pt; font-family: 'arial','sans-serif'"&gt;&lt;span style="color: #a31515"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 12pt; font-family: 'times new roman','serif'"&gt;&lt;div&gt;&lt;span style="font-size: 10pt; font-family: 'arial','sans-serif'"&gt;&lt;span style="color: #a31515"&gt;How do I now get the grid to refresh with the&amp;nbsp;entries now removed?&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: 10pt; color: blue"&gt;For&lt;/span&gt;&lt;span style="font-size: 10pt"&gt; &lt;span style="color: blue"&gt;Each&lt;/span&gt; keyValue &lt;span style="color: blue"&gt;As&lt;/span&gt; &lt;span style="color: blue"&gt;String&lt;/span&gt; &lt;span style="color: blue"&gt;In&lt;/span&gt; WebGrid1.RootTable.GetCheckedRows()&lt;/span&gt;
&lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue"&gt;For&lt;/span&gt;&lt;span style="font-size: 10pt"&gt; &lt;span style="color: blue"&gt;Each&lt;/span&gt; keyValue &lt;span style="color: blue"&gt;As&lt;/span&gt; &lt;span style="color: blue"&gt;String&lt;/span&gt; &lt;span style="color: blue"&gt;In&lt;/span&gt; WebGrid1.RootTable.GetCheckedRows()&lt;/span&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div&gt;&lt;p&gt;&lt;span style="font-size: 10pt"&gt;clsExtractManager.Save(&lt;span style="color: blue"&gt;CInt&lt;/span&gt;(keyValue), &lt;span style="color: #a31515"&gt;"Sideline"&lt;/span&gt;, &lt;span style="color: blue"&gt;True&lt;/span&gt;, intUserID)&lt;/span&gt;
&lt;p&gt;&lt;/p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 10pt; font-family: 'arial','sans-serif'"&gt;Next&lt;/span&gt;
&lt;p&gt;&lt;/p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 10pt; font-family: 'arial','sans-serif'"&gt;WebGrid1.Databind()&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;</description></item></channel></rss>