<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>ASP.NET Dynamic Data</title><link>http://forums.asp.net/1145.aspx</link><description>Discussions regarding the new scaffolding framework in ASP.NET</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: How to search grid results based on user provided values?</title><link>http://forums.asp.net/thread/3525895.aspx</link><pubDate>Sat, 21 Nov 2009 21:00:38 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3525895</guid><dc:creator>sjnaughton</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3525895.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=3525895</wfw:commentRss><description>&lt;p&gt;Hi Kisyv, have a look at my blog post here: &lt;a href="http://csharpbits.notaclue.net/2009/01/dynamic-data-filtering-installation.html"&gt;http://csharpbits.notaclue.net/2009/01/dynamic-data-filtering-installation.html&lt;/a&gt;&amp;nbsp;where I show how to get DD filtering working in your site I hope this helps &lt;img src="http://forums.asp.net/emoticons/emotion-2.gif" alt="Big Smile" /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: How to search grid results based on user provided values?</title><link>http://forums.asp.net/thread/3525857.aspx</link><pubDate>Sat, 21 Nov 2009 20:14:41 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3525857</guid><dc:creator>kisyv</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3525857.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=3525857</wfw:commentRss><description>&lt;p&gt;Im not sure where I shall put this code. Could anyone explain? Im new to ASP.NET and have also looked at http://heyse.us/blog/?p=100 but I can&amp;#39;t get anything out of it. Thanks&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: How to search grid results based on user provided values?</title><link>http://forums.asp.net/thread/2704308.aspx</link><pubDate>Fri, 24 Oct 2008 12:31:46 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2704308</guid><dc:creator>jfaigan</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2704308.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=2704308</wfw:commentRss><description>&lt;p&gt;I tried my hand out at adding the attribute metadata part of the project.&amp;nbsp; I got it working...don&amp;#39;t know if it is optimal but it works.&amp;nbsp; Here is the code:&lt;/p&gt;&lt;font size="2"&gt;[&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;AttributeUsage&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;(&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;AttributeTargets&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.Property | &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;AttributeTargets&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.Class, Inherited = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;true&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, AllowMultiple = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;false&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;)]&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;public&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;class&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;FilterColumnAttribute&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; : &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;Attribute&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;{&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;public&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;static&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;FilterColumnAttribute&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; Default = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;new&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;FilterColumnAttribute&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.Empty);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;public&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; FilterColumnAttribute(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; columns)&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;Columns = columns;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;public&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; Columns { &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;get&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;private&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;set&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;; }&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;-----------------------------------------&lt;/p&gt;
&lt;p&gt;Here are a couple of changes I made to your original code to use the new attribute:&lt;/p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;private&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; FilterColumns(&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;MetaTable&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; table)&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;{&lt;/p&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;FilterColumnAttribute&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; fc = table.Attributes.OfType&amp;lt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;FilterColumnAttribute&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&amp;gt;().DefaultIfEmpty(&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;FilterColumnAttribute&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.Default).First();&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;return&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; fc.Columns;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;}&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;public&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;override&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;IEnumerable&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;Parameter&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&amp;gt; GetWhereParameters(System.Web.DynamicData.&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;IDynamicDataSource&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; dataSource) &lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;{ &lt;/p&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;OrExpressionParameter&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; parameter = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;new&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;OrExpressionParameter&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;(); &lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;[] cols = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;null&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;; &lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;if&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; (!&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.IsNullOrEmpty(FilterColumns(Table))) &lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;cols = FilterColumns(Table).Split(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;#39;,&amp;#39;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;for&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; (&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;int&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; i = 0; i &amp;lt; cols.Length; i++)&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;cols[i] = cols[i].Trim(); &lt;/p&gt;&lt;/font&gt;
&lt;p&gt;--------------------------------------------------------&lt;/p&gt;
&lt;p&gt;This is how I implemented it:&lt;/p&gt;&lt;font size="2"&gt;[&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;FilterColumn&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;NameEn,NameFr,DescriptionEn,DescriptionFr&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;)]&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;partial&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;class&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;PCFSCategory&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;</description></item><item><title>Re: How to search grid results based on user provided values?</title><link>http://forums.asp.net/thread/2702763.aspx</link><pubDate>Thu, 23 Oct 2008 17:10:51 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2702763</guid><dc:creator>jfaigan</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2702763.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=2702763</wfw:commentRss><description>&lt;p&gt;Hey Josh,&lt;/p&gt;
&lt;p&gt;Doh!&amp;nbsp; Ok, silly of me not to have noticed that.&lt;/p&gt;
&lt;p&gt;Thanks for everything.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Joel.&lt;/p&gt;</description></item><item><title>Re: How to search grid results based on user provided values?</title><link>http://forums.asp.net/thread/2702258.aspx</link><pubDate>Thu, 23 Oct 2008 13:07:44 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2702258</guid><dc:creator>jheyse</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2702258.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=2702258</wfw:commentRss><description>&lt;p&gt;Joel,&lt;/p&gt;&lt;p&gt;With this implementation of the Filter Control you don&amp;#39;t need to use any attributes.&amp;nbsp; You can specify which columns can be sorted via the Columns property on the TableTextFilterControl to supply a list of comma separated values of searchable columns.&amp;nbsp; I had mentioned in my blog post that a better implementation would be one which read in the Metadata about the model as opposed to the column.&amp;nbsp; The example I posted was just a short implementation to give you an idea of how to implement such functionality.&lt;/p&gt;&lt;p&gt;I hope this helps.&lt;/p&gt;&lt;p&gt;Josh &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: How to search grid results based on user provided values?</title><link>http://forums.asp.net/thread/2700802.aspx</link><pubDate>Thu, 23 Oct 2008 00:30:38 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2700802</guid><dc:creator>jfaigan</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2700802.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=2700802</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;jheyse:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt; 
&lt;p&gt;Joel,&lt;/p&gt;
&lt;p&gt;The in the code above cols is an array of strings.&amp;nbsp; The Trim() method should be being called on the index of cols at i.&amp;nbsp; cols[i] = cols[i].Trim().ToUpper(); If you just comment the code out you will have some adverse side effects. &lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure what you mean when you refer to the attribute for the metadata.&amp;nbsp; Can you please clarify.&lt;/p&gt;
&lt;p&gt;Josh &lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;Ok, just saw the problem...I did not have the array indexer...must have got lost when I did the original copy...I was trying to apply theTrim to the array which is why I was getting the missing extension error.&lt;/p&gt;
&lt;p&gt;As for the attribute...how do I specify on the partial class which columns should participate in this search.&amp;nbsp; You mentioned that if no columns are specified then all columns will be searched...but how do you specify the distinct set of columns to search?&amp;nbsp; What is the attribute to be used?&lt;/p&gt;
&lt;p&gt;Thanks a lot!&lt;/p&gt;
&lt;p&gt;Joel.&lt;/p&gt;</description></item><item><title>Re: How to search grid results based on user provided values?</title><link>http://forums.asp.net/thread/2700773.aspx</link><pubDate>Wed, 22 Oct 2008 23:30:59 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2700773</guid><dc:creator>jheyse</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2700773.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=2700773</wfw:commentRss><description>&lt;p&gt;Joel,&lt;/p&gt;&lt;p&gt;The in the code above cols is an array of strings.&amp;nbsp; The Trim() method should be being called on the index of cols at i.&amp;nbsp; cols[i] = cols[i].Trim().ToUpper(); If you just comment the code out you will have some adverse side effects. &lt;/p&gt;&lt;p&gt;I&amp;#39;m not sure what you mean when you refer to the attribute for the metadata.&amp;nbsp; Can you please clarify.&lt;/p&gt;&lt;p&gt;Josh &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: How to search grid results based on user provided values?</title><link>http://forums.asp.net/thread/2700731.aspx</link><pubDate>Wed, 22 Oct 2008 22:25:33 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2700731</guid><dc:creator>jfaigan</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2700731.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=2700731</wfw:commentRss><description>&lt;p&gt;Hi jheye,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thanks for getting back to me.&lt;/p&gt;
&lt;p&gt;I was able to get your original code to compile but I had to remove &lt;/p&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;//for (int i = 0; i &amp;lt; cols.Length; i++)&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;// cols = cols.Trim().ToUpper(); &lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font color="#008000" size="2"&gt;because Trim().ToUpper() are extensions to the array class that I do not have.&amp;nbsp; Did you create these extensions? &lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font color="#008000" size="2"&gt;Also, I do not have the attribute class for defining the metadata.&amp;nbsp; Do you have the code for the attribute?&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font color="#008000" size="2"&gt;Please let me know if you don&amp;#39;t know what I am talking about.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font color="#008000" size="2"&gt;Thanks for all of your help!&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font color="#008000" size="2"&gt;Joel.&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;</description></item><item><title>Re: How to search grid results based on user provided values?</title><link>http://forums.asp.net/thread/2699847.aspx</link><pubDate>Wed, 22 Oct 2008 14:52:48 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2699847</guid><dc:creator>jheyse</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2699847.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=2699847</wfw:commentRss><description>&lt;p&gt;Hey Joel,&lt;/p&gt;&lt;p&gt;Sorry for the late response.&amp;nbsp; My blog had some issues with the converting code into emotiocons.&lt;/p&gt;&lt;p&gt;Below should be a version of the filter column that compiles.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="coloredcode"&gt;&lt;span class="kwd"&gt;using&lt;/span&gt; System;
&lt;span class="kwd"&gt;using&lt;/span&gt; System.Collections;
&lt;span class="kwd"&gt;using&lt;/span&gt; System.Configuration;
&lt;span class="kwd"&gt;using&lt;/span&gt; System.Data;
&lt;span class="kwd"&gt;using&lt;/span&gt; System.Linq;
&lt;span class="kwd"&gt;using&lt;/span&gt; System.Web;
&lt;span class="kwd"&gt;using&lt;/span&gt; System.Web.Security;
&lt;span class="kwd"&gt;using&lt;/span&gt; System.Web.UI;
&lt;span class="kwd"&gt;using&lt;/span&gt; System.Web.UI.HtmlControls;
&lt;span class="kwd"&gt;using&lt;/span&gt; System.Web.UI.WebControls;
&lt;span class="kwd"&gt;using&lt;/span&gt; System.Web.UI.WebControls.WebParts;
&lt;span class="kwd"&gt;using&lt;/span&gt; System.Xml.Linq;

&lt;span class="kwd"&gt;using&lt;/span&gt; Catalyst.Web.DynamicData;

&lt;span class="kwd"&gt;public&lt;/span&gt; partial &lt;span class="kwd"&gt;class&lt;/span&gt; TableTextSearch : Catalyst.Web.DynamicData.FilterTemplateUserControlBase
{
    &lt;span class="kwd"&gt;public string&lt;/span&gt; Columns { &lt;span class="kwd"&gt;get&lt;/span&gt;; &lt;span class="kwd"&gt;set&lt;/span&gt;; }
 
    &lt;span class="kwd"&gt;private&lt;/span&gt; MetaTable Table
    {
        &lt;span class="kwd"&gt;get&lt;/span&gt;
        {
            IDynamicDataSource source = &lt;span class="kwd"&gt;this&lt;/span&gt;.FindDataSourceControl();
            &lt;span class="kwd"&gt;if&lt;/span&gt; (source != &lt;span class="kwd"&gt;null&lt;/span&gt;)
                &lt;span class="kwd"&gt;return&lt;/span&gt; source.GetTable();
            &lt;span class="kwd"&gt;return null&lt;/span&gt;;
        }
    }
 
    &lt;span class="kwd"&gt;public override&lt;/span&gt; IEnumerable GetWhereParameters(System.Web.DynamicData.IDynamicDataSource dataSource)
    {
        OrExpressionParameter parameter = &lt;span class="kwd"&gt;new&lt;/span&gt; OrExpressionParameter();
 
        &lt;span class="kwd"&gt;string&lt;/span&gt;[] cols = &lt;span class="kwd"&gt;null&lt;/span&gt;;
        &lt;span class="kwd"&gt;if&lt;/span&gt; (!&lt;span class="kwd"&gt;string&lt;/span&gt;.IsNullOrEmpty(Columns))
        {
            cols = Columns.Split(&lt;span class="st"&gt;&amp;#39;,&amp;#39;&lt;/span&gt;);
            &lt;span class="kwd"&gt;for&lt;/span&gt; (&lt;span class="kwd"&gt;int&lt;/span&gt; i = 0; i &amp;lt; cols.Length; i++)
                cols[i] = cols[i].Trim().ToUpper();
        }
 
        var columns = (from c &lt;span class="kwd"&gt;in&lt;/span&gt; Table.Columns
                       where cols == &lt;span class="kwd"&gt;null&lt;/span&gt; || cols.Length == 0 || cols.Contains(c.Name)
                       group c by c.TypeCode).ToDictionary(g =&amp;gt; g.Key, g =&amp;gt; g);
 
        &lt;span class="kwd"&gt;foreach&lt;/span&gt; (var column &lt;span class="kwd"&gt;in&lt;/span&gt; columns[TypeCode.String])
        {
            parameter.Parameters.Add(&lt;span class="kwd"&gt;new&lt;/span&gt; LikeExpressionParameter()
                    {
                        Type = TypeCode.String,
                        Name = column.Name,
                        Value = TextBox1.Text,
                        Like = LikeExpressionParameter.LikeType.Contains
                    });
        }
        yield &lt;span class="kwd"&gt;return&lt;/span&gt; parameter;
    }
 
    &lt;span class="kwd"&gt;public override void&lt;/span&gt; LoadQueryStringParameters(System.Collections.Specialized.NameValueCollection parameters)
    {
        TextBox1.Text = parameters[&lt;span class="st"&gt;&amp;quot;TableTextSearch&amp;quot;&lt;/span&gt;];
    }
 
    &lt;span class="kwd"&gt;public override&lt;/span&gt; System.Collections.Specialized.NameValueCollection SaveQueryStringParameters()
    {
        &lt;span class="kwd"&gt;return new&lt;/span&gt; NameValueCollection() { { &lt;span class="st"&gt;&amp;quot;TableTextSearch&amp;quot;&lt;/span&gt;, TextBox1.Text } };
    }
 
    &lt;span class="kwd"&gt;public override void&lt;/span&gt; Clear()
    {
        TextBox1.Text = &lt;span class="kwd"&gt;string&lt;/span&gt;.Empty;
    }
}&lt;/pre&gt;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: How to search grid results based on user provided values?</title><link>http://forums.asp.net/thread/2699307.aspx</link><pubDate>Wed, 22 Oct 2008 11:35:08 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2699307</guid><dc:creator>jfaigan</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2699307.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=2699307</wfw:commentRss><description>&lt;p&gt;Hey jheyse,&lt;/p&gt;
&lt;p&gt;Have you had a chance to review this post?&lt;/p&gt;
&lt;p&gt;I removed the Trim() call from the code and everything compiles but without the attribute class it is only searching across all columns.&amp;nbsp; Do you have the code for your attribute class?&amp;nbsp; Will you be publishing a new version of your code soon?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Joel.&lt;/p&gt;</description></item><item><title>Re: How to search grid results based on user provided values?</title><link>http://forums.asp.net/thread/2692089.aspx</link><pubDate>Sat, 18 Oct 2008 23:14:51 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2692089</guid><dc:creator>jfaigan</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2692089.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=2692089</wfw:commentRss><description>&lt;p&gt;Hey jheyse,&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve been trying to implement your TableTextSeach filter control and I&amp;#39;ve copied over the code from your post but I am getting compile errors about missing references (for example it cannot find IDynamicDataSource).&amp;nbsp; Am I missing a reference?&lt;/p&gt;
&lt;p&gt;Have you added this component to CodePlex?&lt;/p&gt;
&lt;p&gt;Thanks a lot!&lt;/p&gt;
&lt;p&gt;Joel.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;--EDIT--&lt;/p&gt;
&lt;p&gt;Forget what I said...I was just missing a using stmt.&lt;/p&gt;
&lt;p&gt;Joel.&lt;/p&gt;
&lt;p&gt;--EDIT--&lt;/p&gt;
&lt;p&gt;Ok, almost have it compiling without errors...most recent error is on cols.Trim()...getting an error that System.Array does not support Trim()&lt;br /&gt;Am I missing a reference or using stmt?&lt;/p&gt;
&lt;p&gt;Also, where is your Columns attribute defined?&amp;nbsp; Which namespace?&amp;nbsp; I assume that this becomes metadata on the table partial class.&lt;/p&gt;
&lt;p&gt;Do you perhaps have a working example?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;Joel.&lt;/p&gt;</description></item><item><title>Re: How to search grid results based on user provided values?</title><link>http://forums.asp.net/thread/2691853.aspx</link><pubDate>Sat, 18 Oct 2008 17:00:09 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2691853</guid><dc:creator>jfaigan</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2691853.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=2691853</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;jheyse:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt; 
&lt;p&gt;&amp;nbsp;Here is a short example on how to accomplish this:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.catalystss.com/blogs/josh_heyse/archive/2008/10/17/dynamic-data-filtering-table-text-search.aspx"&gt;http://blogs.catalystss.com/blogs/josh_heyse/archive/2008/10/17/dynamic-data-filtering-table-text-search.aspx &lt;/a&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;I just checked out the example and that looks pretty amazing!&amp;nbsp; I am going to try to implement it (hopefully today) and I will post feedback here.&lt;/p&gt;
&lt;p&gt;Once again, thank you very much for your help.&lt;/p&gt;
&lt;p&gt;Joel.&lt;/p&gt;</description></item><item><title>Re: How to search grid results based on user provided values?</title><link>http://forums.asp.net/thread/2691848.aspx</link><pubDate>Sat, 18 Oct 2008 16:55:07 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2691848</guid><dc:creator>jfaigan</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2691848.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=2691848</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;jheyse:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt; 
&lt;p&gt;Are you trying to search for only text or all values?&amp;nbsp; For example if you put a date into the text box shoudl it be able to convert and search DateTime columns?&lt;/p&gt;
&lt;p&gt;This is similar to the custom column defined here:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.catalystss.com/blogs/josh_heyse/archive/2008/05/23/a-richer-dynamicdatafilter-part-5-columncontains.aspx"&gt;http://blogs.catalystss.com/blogs/josh_heyse/archive/2008/05/23/a-richer-dynamicdatafilter-part-5-columncontains.aspx &lt;/a&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;Hadn&amp;#39;t really thought about that...I guess that could be very interesting...if the &amp;quot;multi-filter&amp;quot; took into account the data type and tried to convert the user input...&lt;/p&gt;
&lt;p&gt;The &amp;quot;multi-filter&amp;quot; would only need to check against columns that subscribed to it...for example if I had a birthdate field I wouldn&amp;#39;t want the created and modified date fields to be searched as well...that would affect the filter results.&lt;/p&gt;
&lt;p&gt;I wil check out your link!&amp;nbsp; Thanks for the input!&lt;/p&gt;
&lt;p&gt;Joel.&lt;/p&gt;</description></item><item><title>Re: How to search grid results based on user provided values?</title><link>http://forums.asp.net/thread/2691172.aspx</link><pubDate>Sat, 18 Oct 2008 01:48:31 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2691172</guid><dc:creator>jheyse</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2691172.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=2691172</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Here is a short example on how to accomplish this:&lt;/p&gt;&lt;p&gt;&lt;a href="http://blogs.catalystss.com/blogs/josh_heyse/archive/2008/10/17/dynamic-data-filtering-table-text-search.aspx"&gt;http://blogs.catalystss.com/blogs/josh_heyse/archive/2008/10/17/dynamic-data-filtering-table-text-search.aspx &lt;/a&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: How to search grid results based on user provided values?</title><link>http://forums.asp.net/thread/2690228.aspx</link><pubDate>Fri, 17 Oct 2008 15:16:01 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2690228</guid><dc:creator>jheyse</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2690228.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=2690228</wfw:commentRss><description>&lt;p&gt;Are you trying to search for only text or all values?&amp;nbsp; For example if you put a date into the text box shoudl it be able to convert and search DateTime columns?&lt;/p&gt;&lt;p&gt;This is similar to the custom column defined here:&lt;/p&gt;&lt;p&gt;&lt;a href="http://blogs.catalystss.com/blogs/josh_heyse/archive/2008/05/23/a-richer-dynamicdatafilter-part-5-columncontains.aspx"&gt;http://blogs.catalystss.com/blogs/josh_heyse/archive/2008/05/23/a-richer-dynamicdatafilter-part-5-columncontains.aspx &lt;/a&gt;&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>