<?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 – Part 4: Filtering Multiple Columns</title>
	<atom:link href="http://www.reversealchemy.net/blog/2010/02/01/building-a-spgridview-control-%e2%80%93-part-4-filtering-multiple-columns/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.reversealchemy.net/blog/2010/02/01/building-a-spgridview-control-%e2%80%93-part-4-filtering-multiple-columns/</link>
	<description>Complexity through Simplicity</description>
	<lastBuildDate>Tue, 07 Feb 2012 10:29:51 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: Edijs</title>
		<link>http://www.reversealchemy.net/blog/2010/02/01/building-a-spgridview-control-%e2%80%93-part-4-filtering-multiple-columns/comment-page-1/#comment-547</link>
		<dc:creator>Edijs</dc:creator>
		<pubDate>Mon, 06 Feb 2012 11:10:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.reversealchemy.net/?p=308#comment-547</guid>
		<description>Hi Erik,

Thank you for publishing this blog series, it worked well for my solution.</description>
		<content:encoded><![CDATA[<p>Hi Erik,</p>
<p>Thank you for publishing this blog series, it worked well for my solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik Burger</title>
		<link>http://www.reversealchemy.net/blog/2010/02/01/building-a-spgridview-control-%e2%80%93-part-4-filtering-multiple-columns/comment-page-1/#comment-488</link>
		<dc:creator>Erik Burger</dc:creator>
		<pubDate>Sat, 11 Jun 2011 13:24:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.reversealchemy.net/?p=308#comment-488</guid>
		<description>Thanks very much Paul for sharing your fix and for the compliment :)</description>
		<content:encoded><![CDATA[<p>Thanks very much Paul for sharing your fix and for the compliment <img src='http://www.reversealchemy.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Manu</title>
		<link>http://www.reversealchemy.net/blog/2010/02/01/building-a-spgridview-control-%e2%80%93-part-4-filtering-multiple-columns/comment-page-1/#comment-469</link>
		<dc:creator>Manu</dc:creator>
		<pubDate>Thu, 26 May 2011 09:45:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.reversealchemy.net/?p=308#comment-469</guid>
		<description>Hello Erik. I am using version 2, but with datetime fields it does not short. Is it usefull version 4 for this?
Thank you for sharing the code. If anyone is interested I am added some functionality for Sharepoint foundation and CAML.</description>
		<content:encoded><![CDATA[<p>Hello Erik. I am using version 2, but with datetime fields it does not short. Is it usefull version 4 for this?<br />
Thank you for sharing the code. If anyone is interested I am added some functionality for Sharepoint foundation and CAML.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://www.reversealchemy.net/blog/2010/02/01/building-a-spgridview-control-%e2%80%93-part-4-filtering-multiple-columns/comment-page-1/#comment-467</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Wed, 25 May 2011 19:48:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.reversealchemy.net/?p=308#comment-467</guid>
		<description>First off....this is a great article and the code is extremely useful.  I&#039;d like to propose a fix though.  If you put multiple instances of the webpart on the same page, the filter breaks.  The reason is the Template Client ID for the FilterPreMenuOpen always gets set to the first webpart.  Adding the following two lines of code for building the ClientOnClickPreMenuOpen solves the problem:

menu.ClientOnClickPreMenuOpen = menu.ClientOnClickPreMenuOpen.Replace(&quot;%TEMPLATECLIENTID%&quot;, this.ClientID + &quot;_SPGridViewFilterMenuTemplate&quot;);
menu.ClientOnClickPreMenuOpen = menu.ClientOnClickPreMenuOpen.Replace(&quot;%MENUCLIENTID%&quot;, this.ClientID + &quot;_ctl01_&quot; + menu.ID);

Great work though!!

Paul</description>
		<content:encoded><![CDATA[<p>First off&#8230;.this is a great article and the code is extremely useful.  I&#8217;d like to propose a fix though.  If you put multiple instances of the webpart on the same page, the filter breaks.  The reason is the Template Client ID for the FilterPreMenuOpen always gets set to the first webpart.  Adding the following two lines of code for building the ClientOnClickPreMenuOpen solves the problem:</p>
<p>menu.ClientOnClickPreMenuOpen = menu.ClientOnClickPreMenuOpen.Replace(&#8220;%TEMPLATECLIENTID%&#8221;, this.ClientID + &#8220;_SPGridViewFilterMenuTemplate&#8221;);<br />
menu.ClientOnClickPreMenuOpen = menu.ClientOnClickPreMenuOpen.Replace(&#8220;%MENUCLIENTID%&#8221;, this.ClientID + &#8220;_ctl01_&#8221; + menu.ID);</p>
<p>Great work though!!</p>
<p>Paul</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik Burger</title>
		<link>http://www.reversealchemy.net/blog/2010/02/01/building-a-spgridview-control-%e2%80%93-part-4-filtering-multiple-columns/comment-page-1/#comment-376</link>
		<dc:creator>Erik Burger</dc:creator>
		<pubDate>Sat, 12 Mar 2011 15:08:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.reversealchemy.net/?p=308#comment-376</guid>
		<description>Hi Alex,

And thank you for using this example :) I read your post and it&#039;s great, I really recommend anyone reading this to check it out.

Keep up the good work!

Erik</description>
		<content:encoded><![CDATA[<p>Hi Alex,</p>
<p>And thank you for using this example <img src='http://www.reversealchemy.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I read your post and it&#8217;s great, I really recommend anyone reading this to check it out.</p>
<p>Keep up the good work!</p>
<p>Erik</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://www.reversealchemy.net/blog/2010/02/01/building-a-spgridview-control-%e2%80%93-part-4-filtering-multiple-columns/comment-page-1/#comment-375</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Tue, 08 Mar 2011 09:13:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.reversealchemy.net/?p=308#comment-375</guid>
		<description>Hi Erik,
Thanks for sharing this example! I used it with Sharepoint 2010 and it works well. I expanded its filtering features for using with multi values columns (like TaxonomyFieldMulti and LookupMulti). I posted implementation details here: http://sadomovalex.blogspot.com/2011/03/spgridview-with-filtering-by-multiple.html (my post contains links to this article). Thanks again.

Alex</description>
		<content:encoded><![CDATA[<p>Hi Erik,<br />
Thanks for sharing this example! I used it with Sharepoint 2010 and it works well. I expanded its filtering features for using with multi values columns (like TaxonomyFieldMulti and LookupMulti). I posted implementation details here: <a href="http://sadomovalex.blogspot.com/2011/03/spgridview-with-filtering-by-multiple.html" rel="nofollow">http://sadomovalex.blogspot.com/2011/03/spgridview-with-filtering-by-multiple.html</a> (my post contains links to this article). Thanks again.</p>
<p>Alex</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Julian</title>
		<link>http://www.reversealchemy.net/blog/2010/02/01/building-a-spgridview-control-%e2%80%93-part-4-filtering-multiple-columns/comment-page-1/#comment-372</link>
		<dc:creator>Julian</dc:creator>
		<pubDate>Sun, 20 Feb 2011 21:18:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.reversealchemy.net/?p=308#comment-372</guid>
		<description>I have used you sample code and it works great!!.  I have a issue that I hope you have an answer for.  The selectdata() function is called about a 6 times when the page loads.  Is there a work around for this????


thanks

Julian</description>
		<content:encoded><![CDATA[<p>I have used you sample code and it works great!!.  I have a issue that I hope you have an answer for.  The selectdata() function is called about a 6 times when the page loads.  Is there a work around for this????</p>
<p>thanks</p>
<p>Julian</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik Burger</title>
		<link>http://www.reversealchemy.net/blog/2010/02/01/building-a-spgridview-control-%e2%80%93-part-4-filtering-multiple-columns/comment-page-1/#comment-361</link>
		<dc:creator>Erik Burger</dc:creator>
		<pubDate>Wed, 09 Feb 2011 05:48:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.reversealchemy.net/?p=308#comment-361</guid>
		<description>Hi,

Great work! Seems a very clean and simple solution.

Erik</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Great work! Seems a very clean and simple solution.</p>
<p>Erik</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik Burger</title>
		<link>http://www.reversealchemy.net/blog/2010/02/01/building-a-spgridview-control-%e2%80%93-part-4-filtering-multiple-columns/comment-page-1/#comment-360</link>
		<dc:creator>Erik Burger</dc:creator>
		<pubDate>Wed, 09 Feb 2011 05:39:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.reversealchemy.net/?p=308#comment-360</guid>
		<description>Hi,

No, I haven&#039;t had the chance to do so yet. Time permitting, I am planning to do so soon. My guess is it should work but Microsoft may have changed the spgridview.js file which would make it break. If I get a chance to check it out I will definately post about any issues I might find.

Erik</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>No, I haven&#8217;t had the chance to do so yet. Time permitting, I am planning to do so soon. My guess is it should work but Microsoft may have changed the spgridview.js file which would make it break. If I get a chance to check it out I will definately post about any issues I might find.</p>
<p>Erik</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PeterGa</title>
		<link>http://www.reversealchemy.net/blog/2010/02/01/building-a-spgridview-control-%e2%80%93-part-4-filtering-multiple-columns/comment-page-1/#comment-343</link>
		<dc:creator>PeterGa</dc:creator>
		<pubDate>Thu, 20 Jan 2011 15:46:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.reversealchemy.net/?p=308#comment-343</guid>
		<description>I already fixed the thing with all filtering options if multiple filtering is enabled on more columns.

Just what you need is put this part of code to 

 protected sealed override void CreateChildControls()
        {
            const string GRIDID = &quot;grid&quot;;
            const string DATASOURCEID = &quot;gridDS&quot;;

            gridDS = new ObjectDataSource();
            gridDS.ID = DATASOURCEID;
            gridDS.SelectMethod = &quot;SelectData&quot;;
            gridDS.TypeName = this.GetType().AssemblyQualifiedName;
            gridDS.ObjectCreating += new ObjectDataSourceObjectEventHandler(gridDS_ObjectCreating);
            this.Controls.Add(gridDS);

            if (Page.IsCallback &amp; ViewState[&quot;FilterExpression&quot;]!=null)
            {
                gridDS.FilterExpression = ViewState[&quot;FilterExpression&quot;].ToString();
            }
        ....
        }</description>
		<content:encoded><![CDATA[<p>I already fixed the thing with all filtering options if multiple filtering is enabled on more columns.</p>
<p>Just what you need is put this part of code to </p>
<p> protected sealed override void CreateChildControls()<br />
        {<br />
            const string GRIDID = &#8220;grid&#8221;;<br />
            const string DATASOURCEID = &#8220;gridDS&#8221;;</p>
<p>            gridDS = new ObjectDataSource();<br />
            gridDS.ID = DATASOURCEID;<br />
            gridDS.SelectMethod = &#8220;SelectData&#8221;;<br />
            gridDS.TypeName = this.GetType().AssemblyQualifiedName;<br />
            gridDS.ObjectCreating += new ObjectDataSourceObjectEventHandler(gridDS_ObjectCreating);<br />
            this.Controls.Add(gridDS);</p>
<p>            if (Page.IsCallback &amp; ViewState["FilterExpression"]!=null)<br />
            {<br />
                gridDS.FilterExpression = ViewState["FilterExpression"].ToString();<br />
            }<br />
        &#8230;.<br />
        }</p>
]]></content:encoded>
	</item>
</channel>
</rss>

