﻿<?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 - WebGrid and ISDataSource Filtering issue</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-and-ISDataSource-Filtering-issue/</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>WebGrid and ISDataSource Filtering issue</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-and-ISDataSource-Filtering-issue/</link><pubDate>Tue, 13 Dec 2011 03:18:36 GMT</pubDate><dc:creator>handy@intersoftpt.com</dc:creator><description>&lt;p&gt;Hello Jim,&lt;/p&gt;&lt;p&gt;Yes, We understand. But WebGrid has its own mechanism. If you want, you can filter or bind by using WebCombo or others control as parameter. I send you my sample include how to modify sorting from javascript.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Handy&lt;/p&gt;</description></item><item><title>WebGrid and ISDataSource Filtering issue</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-and-ISDataSource-Filtering-issue/</link><pubDate>Thu, 08 Dec 2011 07:58:17 GMT</pubDate><dc:creator>jdresser@idexcorp.com</dc:creator><description>Thanks for your response Handy, but I disagree with your conclusion - I still believe it's a bug. The issue also happens if you bind the WebGrid to a plain old SQLDataSource instead of the ISDataSource.&lt;br /&gt;&lt;br /&gt;If you read Microsoft's documentation http://msdn.microsoft.com/en-us/library/59bfya48.aspx it says "&lt;em&gt;By adding filtering to a &lt;span&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.sqldatasource.aspx"&gt;SqlDataSource&lt;/a&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="input"&gt; &lt;/span&gt;&lt;/span&gt;control, &lt;strong&gt;you can change what data is made available&lt;/strong&gt; by the &lt;span&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.sqldatasource.aspx"&gt;SqlDataSource&lt;/a&gt;&lt;/span&gt; after a query has been run, without returning to the database.&lt;/em&gt;"&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Every other bound control (Gridviews, Dropdowns....) behave this way - ie, changing the data that is sent to the bound control. Your WebGrid does not.&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;Now, I had to go down this path because of all the problems that I've run into trying to get the WebGrid to Filter and Sort programatically (either by javascript or code behind).&lt;br /&gt;&lt;br /&gt;Some of our users can't figure out how to use the FilterBar, so I wanted to add buttons to the form which would have pre-defined filters and sorts.&lt;br /&gt;I started with the sample on this page http://www.intersoftpt.com/Support/WebGrid/KB/Filter-a-Column-Using-HTML-Button-in-WebGrid/ which hooks some javascript up to a button, to add and remove filtering from the WebGrid. This works, but only in very simple conditions. ie, if you click the 'add filter' button, the WebGrid does filter - great. Now, show the filterbar, manually add another filter, then click 'Remove Filter'. 'Remove Filter' does not remove the 2 filters that are now being used by the WebGrid. My application may have 3, 4 or 5 filters applied at any time, so trying to keep track of how many filters to remove does not seem easy to do. There does not seem to be a "&lt;strong&gt;grid.RootTable.FilteredColumns.Remove(All)&lt;/strong&gt;" function.&lt;br /&gt;&lt;br /&gt;And I never got sorting working at all (using javaScript).&amp;nbsp; If you have a sample that shows how to add and remove sort order using javascript, it would be great.&amp;nbsp;&amp;nbsp; So, being a good programmer, I thought that if I changed the dataSource, the WebGrid would just show what the datasource was sending it.&amp;nbsp; But your WebGrid does not behave this way.&lt;br /&gt;&lt;br /&gt;Any other ideas?&lt;br /&gt;Thanks,&lt;br /&gt;Jim&lt;br /&gt;</description></item><item><title>WebGrid and ISDataSource Filtering issue</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-and-ISDataSource-Filtering-issue/</link><pubDate>Wed, 07 Dec 2011 22:55:22 GMT</pubDate><dc:creator>handy@intersoftpt.com</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;&lt;p&gt;Based on discussion with our developer teams, unfortunately, it is not a bug. Using FilterExpression does not mean the operation done in server. In server, ISDataSource still selects based on your SelectMethod. There is no filter expression in query at all. So, basically, filter expression process is done in client side process.&lt;br /&gt;Since WebGrid has its own mechanism for filtering, filter expression from ISDataSource would be reset because it is client side operation.&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Handy&lt;/p&gt;</description></item><item><title>WebGrid and ISDataSource Filtering issue</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-and-ISDataSource-Filtering-issue/</link><pubDate>Wed, 07 Dec 2011 22:26:08 GMT</pubDate><dc:creator>handy@intersoftpt.com</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;I can replicate your issue. I would try to discuss with our developer teams regarding this matter. I will let you know when it's done.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Handy&lt;/p&gt;</description></item><item><title>WebGrid and ISDataSource Filtering issue</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-and-ISDataSource-Filtering-issue/</link><pubDate>Wed, 07 Dec 2011 20:06:34 GMT</pubDate><dc:creator>jdresser@idexcorp.com</dc:creator><description>&lt;p&gt;I've found a problem where a WebGrid, which is bound to a ISDataSource, is not showing filtered data, even though the ISDatasource is filtered.  I'm using the latest dlls from WebStudio 2011 R1 SP1.&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Let me explain.  Below is some very basic code - there is nothing on the code behind page, it's all on the aspx page.  There's a webGrid, and asp:GridView, and a ISDataSource.   The ISData source is connected to a database table, and it has a &lt;strong&gt;FilterExpression&lt;/strong&gt; to limit the data that is returned.&lt;/p&gt;
&lt;p&gt;Now,  Both the WebGrid and the asp:GridView are bound to this ISDataSource.  I expect the WebGrid to show the filtered data, but it doesn't, the WebGrid shows all of the data from the datasource, not the filtered data.&lt;/p&gt;
&lt;p&gt;Yet, the asp:GridView, which is bound to the very same ISDataSource control, does show just the filtered data.   &lt;br /&gt;&lt;/p&gt;
&lt;p&gt;If both controls are bound to the same datasource, why don't they show the same data?  Please explain how I can get the WebGrid to show the filtered data that the ISDataSource is providing.  I do not want to use the filtering that is part of the WebGrid, I want the filtering to be done in the ISDatasource.&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Thanks, Jim&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre&gt;      &amp;lt;ISWebGrid:WebGrid ID="WebGrid1" runat="server" DataMember="Summaries_WebCatFilters" DataSourceID="ISDataSource2" Height="250px" 
        UseDefaultStyle="True" &amp;gt;
        &amp;lt;RootTable DataKeyField="Pid" &amp;gt;
          &amp;lt;Columns&amp;gt;
            &amp;lt;ISWebGrid:WebGridColumn Caption="Pid" DataMember="Pid" DataType="System.Int32" Name="Pid" Width="100px"&amp;gt;
            &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;
            &amp;lt;ISWebGrid:WebGridColumn Caption="FullPartNumber" DataMember="FullPartNumber" Name="FullPartNumber" Width="100px"&amp;gt;
            &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;
          &amp;lt;/Columns&amp;gt;
        &amp;lt;/RootTable&amp;gt;
      &amp;lt;/ISWebGrid:WebGrid&amp;gt;
      &amp;lt;asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False" CssClass="text" DataKeyNames="FullPartNumber"
        DataSourceID="ISDataSource2" Width="100%"&amp;gt;
        &amp;lt;Columns&amp;gt;
          &amp;lt;asp:BoundField DataField="Pid" HeaderText="Pid" InsertVisible="False" ReadOnly="True" SortExpression="Pid" /&amp;gt;
          &amp;lt;asp:BoundField DataField="FullPartNumber" HeaderText="FullPartNumber" InsertVisible="False" ReadOnly="True" SortExpression="FullPartNumber" /&amp;gt;
        &amp;lt;/Columns&amp;gt;
        &amp;lt;PagerStyle CssClass="pager" /&amp;gt;
        &amp;lt;HeaderStyle CssClass="header" /&amp;gt;
      &amp;lt;/asp:GridView&amp;gt;
      
      &amp;lt;ISDataSource:ISDataSource ID="ISDataSource2" runat="server" SchemaName="WebSpecMaster.App_Code.DataSet_ISISWebStaging"&amp;gt;
        &amp;lt;Tables&amp;gt;
          &amp;lt;ISDataSource:ISDataSourceTable SelectMethod="GetData" TableName="Summaries_WebCatFilters" 
           &lt;strong&gt; FilterExpression="FullPartNumber Like '12345'" 
&lt;/strong&gt;            TypeName="WebSpecMaster.App_Code.DataSet_ISISWebStagingTableAdapters.Summaries_WebCatFiltersTableAdapter"&amp;gt;
          &amp;lt;/ISDataSource:ISDataSourceTable&amp;gt;
        &amp;lt;/Tables&amp;gt;
      &amp;lt;/ISDataSource:ISDataSource&amp;gt;
&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>