<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Building A SPGridView Control &#8211; Part 2: Filtering</title>
	<atom:link href="http://www.reversealchemy.net/2009/05/24/building-a-spgridview-control-part-2-filtering/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.reversealchemy.net/blog/2009/05/24/building-a-spgridview-control-part-2-filtering/</link>
	<description>Complexity through Simplicity</description>
	<lastBuildDate>Fri, 03 Feb 2012 15:51:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: Erik Burger</title>
		<link>http://www.reversealchemy.net/blog/2009/05/24/building-a-spgridview-control-part-2-filtering/comment-page-1/#comment-544</link>
		<dc:creator>Erik Burger</dc:creator>
		<pubDate>Wed, 11 Jan 2012 11:22:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.reversealchemy.net/?p=163#comment-544</guid>
		<description>Hello Denis,

Thank you for the compliment. Could it be that you forgot to include the js file specific for the aspgridview? As far as I can remember (and unfortunately it&#039;s been a while) the dropdown menu is managed by the javascript.

Kind regards,

Erik</description>
		<content:encoded><![CDATA[<p>Hello Denis,</p>
<p>Thank you for the compliment. Could it be that you forgot to include the js file specific for the aspgridview? As far as I can remember (and unfortunately it&#8217;s been a while) the dropdown menu is managed by the javascript.</p>
<p>Kind regards,</p>
<p>Erik</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Denis Fedynich</title>
		<link>http://www.reversealchemy.net/blog/2009/05/24/building-a-spgridview-control-part-2-filtering/comment-page-1/#comment-543</link>
		<dc:creator>Denis Fedynich</dc:creator>
		<pubDate>Tue, 10 Jan 2012 16:07:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.reversealchemy.net/?p=163#comment-543</guid>
		<description>Hello, Erik

Great article. Thanks a lot for its sharing.

I don&#039;t know, how it can be possible, because as I see, all functions worked well for all previous users. But I have a problem with sorting. I have just made copy-paste of the source code and had the exception while trying to use sorting from the drop-down menu. The exception was like &#039;System.IndexOutOfRangeException: Cannot find column Region.    at System.Data.DataTable.ParseSortString(String sortString).....&#039;. I want to mention, that if I click on the header sorting goes well, but if I use Sorting from the drop down menu I got this error. It doesn&#039;t matter what column I use. The exception occurs on every of them. Do you have any ideas about this situation?</description>
		<content:encoded><![CDATA[<p>Hello, Erik</p>
<p>Great article. Thanks a lot for its sharing.</p>
<p>I don&#8217;t know, how it can be possible, because as I see, all functions worked well for all previous users. But I have a problem with sorting. I have just made copy-paste of the source code and had the exception while trying to use sorting from the drop-down menu. The exception was like &#8216;System.IndexOutOfRangeException: Cannot find column Region.    at System.Data.DataTable.ParseSortString(String sortString)&#8230;..&#8217;. I want to mention, that if I click on the header sorting goes well, but if I use Sorting from the drop down menu I got this error. It doesn&#8217;t matter what column I use. The exception occurs on every of them. Do you have any ideas about this situation?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik Burger</title>
		<link>http://www.reversealchemy.net/blog/2009/05/24/building-a-spgridview-control-part-2-filtering/comment-page-1/#comment-541</link>
		<dc:creator>Erik Burger</dc:creator>
		<pubDate>Thu, 29 Dec 2011 12:05:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.reversealchemy.net/?p=163#comment-541</guid>
		<description>Hi Althaf,

Ah I misunderstood your question then, my apologies. I am not sure about the answer but I would start by taking a look at the javascript attached to the SPGridView. The filter dropdown is built there. That may also provide a hint as to which method is called to return the recordset.

I hope this helps.

Erik</description>
		<content:encoded><![CDATA[<p>Hi Althaf,</p>
<p>Ah I misunderstood your question then, my apologies. I am not sure about the answer but I would start by taking a look at the javascript attached to the SPGridView. The filter dropdown is built there. That may also provide a hint as to which method is called to return the recordset.</p>
<p>I hope this helps.</p>
<p>Erik</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Althaf</title>
		<link>http://www.reversealchemy.net/blog/2009/05/24/building-a-spgridview-control-part-2-filtering/comment-page-1/#comment-540</link>
		<dc:creator>Althaf</dc:creator>
		<pubDate>Thu, 22 Dec 2011 23:32:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.reversealchemy.net/?p=163#comment-540</guid>
		<description>As far as my understanding goes, filter expression is used to filter the data i.e. after choosing the value from the filter dropdown. I tried putting without quotes as well but did not help.

I am looking to get the filter dropdown values itself in asc/desc order based on their datasource column type. Is there any datasource/grid event to track the values assigned to filter dropdown that gets the distinct set of values from the entire recordset binded to the grid?</description>
		<content:encoded><![CDATA[<p>As far as my understanding goes, filter expression is used to filter the data i.e. after choosing the value from the filter dropdown. I tried putting without quotes as well but did not help.</p>
<p>I am looking to get the filter dropdown values itself in asc/desc order based on their datasource column type. Is there any datasource/grid event to track the values assigned to filter dropdown that gets the distinct set of values from the entire recordset binded to the grid?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik Burger</title>
		<link>http://www.reversealchemy.net/blog/2009/05/24/building-a-spgridview-control-part-2-filtering/comment-page-1/#comment-539</link>
		<dc:creator>Erik Burger</dc:creator>
		<pubDate>Thu, 22 Dec 2011 09:26:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.reversealchemy.net/?p=163#comment-539</guid>
		<description>Hi Althaf,

Thank you for your compliment. I am glad the code seems to be working well for you.

We set the filter expression as follows:

&lt;pre lang=&quot;csharp&quot;&gt;grid.FilteredDataSourcePropertyFormat = &quot;{1} = &#039;{0}&#039;&quot;&lt;/pre&gt;

As you can see there we use single quotes around the filter value. This causes the value to be treated as a string. Removing the quotes should resolve the problem with integers. You will need to come up with a way to determine whether the value to be filtered is a string or integer.

I hope this helps,

Erik</description>
		<content:encoded><![CDATA[<p>Hi Althaf,</p>
<p>Thank you for your compliment. I am glad the code seems to be working well for you.</p>
<p>We set the filter expression as follows:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;">grid<span style="color: #008000;">.</span><span style="color: #0000FF;">FilteredDataSourcePropertyFormat</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;{1} = '{0}'&quot;</span></pre></div></div>

<p>As you can see there we use single quotes around the filter value. This causes the value to be treated as a string. Removing the quotes should resolve the problem with integers. You will need to come up with a way to determine whether the value to be filtered is a string or integer.</p>
<p>I hope this helps,</p>
<p>Erik</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Althaf</title>
		<link>http://www.reversealchemy.net/blog/2009/05/24/building-a-spgridview-control-part-2-filtering/comment-page-1/#comment-538</link>
		<dc:creator>Althaf</dc:creator>
		<pubDate>Wed, 21 Dec 2011 15:40:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.reversealchemy.net/?p=163#comment-538</guid>
		<description>Great article. I could make sort and filtering work absolutely fine but on integer (number field) columns, the filter dropdown does not show values in ascending order. Filter shows as 1,11, 100, 2, 4, 41 instead of showing 1,2,4,11,41,100. How do we make filter expression understand that this column is integer type?</description>
		<content:encoded><![CDATA[<p>Great article. I could make sort and filtering work absolutely fine but on integer (number field) columns, the filter dropdown does not show values in ascending order. Filter shows as 1,11, 100, 2, 4, 41 instead of showing 1,2,4,11,41,100. How do we make filter expression understand that this column is integer type?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: akko</title>
		<link>http://www.reversealchemy.net/blog/2009/05/24/building-a-spgridview-control-part-2-filtering/comment-page-1/#comment-531</link>
		<dc:creator>akko</dc:creator>
		<pubDate>Fri, 16 Sep 2011 13:21:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.reversealchemy.net/?p=163#comment-531</guid>
		<description>@Elad, How did you do it?
 I sign the spgriview.groupfield = &quot;title&quot;; and 
 set the spgridview.enableViewstate = false. 
but it doesn&#039;t help. Can you explain more?

I read your attached link. but i doen&#039;t solved problem, in this example.

btw, in this example, it set viewstate for sorting, filtering. so if you display the viewstate for grouping, do sorting and filtering works?</description>
		<content:encoded><![CDATA[<p>@Elad, How did you do it?<br />
 I sign the spgriview.groupfield = &#8220;title&#8221;; and<br />
 set the spgridview.enableViewstate = false.<br />
but it doesn&#8217;t help. Can you explain more?</p>
<p>I read your attached link. but i doen&#8217;t solved problem, in this example.</p>
<p>btw, in this example, it set viewstate for sorting, filtering. so if you display the viewstate for grouping, do sorting and filtering works?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik Burger</title>
		<link>http://www.reversealchemy.net/blog/2009/05/24/building-a-spgridview-control-part-2-filtering/comment-page-1/#comment-527</link>
		<dc:creator>Erik Burger</dc:creator>
		<pubDate>Wed, 07 Sep 2011 11:59:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.reversealchemy.net/?p=163#comment-527</guid>
		<description>Thanks for sharing that Elad, glad you figured it out .

Erik</description>
		<content:encoded><![CDATA[<p>Thanks for sharing that Elad, glad you figured it out .</p>
<p>Erik</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Elad Rosenberg</title>
		<link>http://www.reversealchemy.net/blog/2009/05/24/building-a-spgridview-control-part-2-filtering/comment-page-1/#comment-526</link>
		<dc:creator>Elad Rosenberg</dc:creator>
		<pubDate>Wed, 07 Sep 2011 11:53:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.reversealchemy.net/?p=163#comment-526</guid>
		<description>Hi,
great article but notice that if u combine this with AllowGrouping=true u will suffer from run time error when postback (sorting, paging).
To solve this just make the SPGrid enableViewState = false.
also see this :
http://mossindepth.blogspot.com/2009/05/spgridview-grouping-is-it-easy-to-apply.html</description>
		<content:encoded><![CDATA[<p>Hi,<br />
great article but notice that if u combine this with AllowGrouping=true u will suffer from run time error when postback (sorting, paging).<br />
To solve this just make the SPGrid enableViewState = false.<br />
also see this :<br />
<a href="http://mossindepth.blogspot.com/2009/05/spgridview-grouping-is-it-easy-to-apply.html" rel="nofollow">http://mossindepth.blogspot.com/2009/05/spgridview-grouping-is-it-easy-to-apply.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Elad Rosenberg</title>
		<link>http://www.reversealchemy.net/blog/2009/05/24/building-a-spgridview-control-part-2-filtering/comment-page-1/#comment-525</link>
		<dc:creator>Elad Rosenberg</dc:creator>
		<pubDate>Tue, 06 Sep 2011 12:28:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.reversealchemy.net/?p=163#comment-525</guid>
		<description>Hi,
Great article.
my filtering is also stuck with loading... and i dont have special chars...
i didnt understand Florent solution, i just copy &amp; paste the code from artile.

thanks in advance</description>
		<content:encoded><![CDATA[<p>Hi,<br />
Great article.<br />
my filtering is also stuck with loading&#8230; and i dont have special chars&#8230;<br />
i didnt understand Florent solution, i just copy &amp; paste the code from artile.</p>
<p>thanks in advance</p>
]]></content:encoded>
	</item>
</channel>
</rss>

