Warning: Constant ABSPATH already defined in /var/www/html/site/wp-config.php on line 30

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/site/wp-config.php:30) in /var/www/html/site/wp-content/plugins/comet-cache/src/includes/traits/Shared/HttpUtils.php on line 172

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/site/wp-config.php:30) in /var/www/html/site/wp-content/plugins/comet-cache/src/includes/traits/Shared/HttpUtils.php on line 173

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/site/wp-config.php:30) in /var/www/html/site/wp-content/plugins/comet-cache/src/includes/traits/Shared/HttpUtils.php on line 174

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/site/wp-config.php:30) in /var/www/html/site/wp-content/plugins/comet-cache/src/includes/traits/Shared/HttpUtils.php on line 175

Warning: Constant WP_DEBUG already defined in /var/www/html/site/wp-config.php on line 35

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/site/wp-config.php:30) in /var/www/html/site/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/site/wp-config.php:30) in /var/www/html/site/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/site/wp-config.php:30) in /var/www/html/site/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/site/wp-config.php:30) in /var/www/html/site/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/site/wp-config.php:30) in /var/www/html/site/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/site/wp-config.php:30) in /var/www/html/site/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Undefined variable $phpexec_output in /var/www/html/site/wp-content/plugins/phpexec.php on line 68

Warning: Undefined variable $phpexec_output in /var/www/html/site/wp-content/plugins/phpexec.php on line 68

Warning: Undefined variable $phpexec_output in /var/www/html/site/wp-content/plugins/phpexec.php on line 68

Warning: Undefined variable $phpexec_output in /var/www/html/site/wp-content/plugins/phpexec.php on line 68

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/site/wp-config.php:30) in /var/www/html/site/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/site/wp-config.php:30) in /var/www/html/site/wp-includes/rest-api/class-wp-rest-server.php on line 1893
{"id":262,"date":"2011-03-01T22:58:46","date_gmt":"2011-03-01T21:58:46","guid":{"rendered":"http:\/\/www.trappers.tk\/site\/?p=262"},"modified":"2013-04-27T10:33:00","modified_gmt":"2013-04-27T09:33:00","slug":"asp-net-dynamic-data-text-filter-search","status":"publish","type":"post","link":"https:\/\/jeroentrappers.be\/site\/2011\/03\/01\/asp-net-dynamic-data-text-filter-search\/","title":{"rendered":"ASP.NET Dynamic Data – Text filter \/ Search"},"content":{"rendered":"

I’ve implemented a Filter to apply on text fields in ASP.NET Dynamic Data<\/a> websites.<\/p>\n

\"\"<\/a><\/p>\n

To use it: include the code<\/a> in your project by putting it in the DynamicData\\Filters folder. Then apply the filter to the field you want to enable filtering on using the FilterUIHint attribute.<\/p>\n

Example:<\/p>\n

[MetadataType(typeof(Category_MetaData))]\r\npublic partial class Category\r\n{\r\n  class Category_MetaData\r\n  {\r\n    [FilterUIHint(\"TextFilter\")]\r\n    public string Description { get; set; }\r\n  }\r\n}\r\n<\/pre>\n

You have to manually trigger the application of the query filter by adding a button to the appropriate template. For example, add this to the List.aspx template:<\/p>\n

\r\n\r\n<\/pre>\n

in the code behind for that template:<\/p>\n

\r\nprotected void SearchButton_Click(object sender, EventArgs e)\r\n{\r\n  ((IQueryableDataSource)this.GridDataSource)\r\n      .RaiseViewChanged();\r\n}\r\n<\/pre>\n

If you want to see it in action, you can download the full sample code<\/a>, which is based on the famous Northwind<\/a> database on SQLExpress.<\/p>\n

I got a lot of inspiration and help from msdn<\/a> and this blog post<\/a> to get to a decent implementation for this.<\/p>\n

Like always I’ve compressed the code using 7-zip<\/a>. The best compression tool. Ever.<\/p>\n","protected":false},"excerpt":{"rendered":"

I’ve implemented a Filter to apply on text fields in ASP.NET Dynamic Data websites. To use it: include the code in your project by putting it in the DynamicData\\Filters folder. Then apply the filter to the field you want to enable filtering on using the FilterUIHint attribute. Example: [MetadataType(typeof(Category_MetaData))] public partial class Category { class…<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[4],"tags":[],"class_list":["post-262","post","type-post","status-publish","format-standard","hentry","category-technologie"],"jetpack_publicize_connections":[],"yoast_head":"\nASP.NET Dynamic Data - Text filter \/ Search - Appmire blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jeroentrappers.be\/site\/2011\/03\/01\/asp-net-dynamic-data-text-filter-search\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"ASP.NET Dynamic Data - Text filter \/ Search - Appmire blog\" \/>\n<meta property=\"og:description\" content=\"I’ve implemented a Filter to apply on text fields in ASP.NET Dynamic Data websites. To use it: include the code in your project by putting it in the DynamicDataFilters folder. Then apply the filter to the field you want to enable filtering on using the FilterUIHint attribute. Example: [MetadataType(typeof(Category_MetaData))] public partial class Category { class...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jeroentrappers.be\/site\/2011\/03\/01\/asp-net-dynamic-data-text-filter-search\/\" \/>\n<meta property=\"og:site_name\" content=\"Appmire blog\" \/>\n<meta property=\"article:published_time\" content=\"2011-03-01T21:58:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2013-04-27T09:33:00+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.trappers.tk\/site\/wp-content\/uploads\/2011\/03\/Filter.png\" \/>\n<meta name=\"author\" content=\"Jeroen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeroen\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/jeroentrappers.be\/site\/2011\/03\/01\/asp-net-dynamic-data-text-filter-search\/\",\"url\":\"https:\/\/jeroentrappers.be\/site\/2011\/03\/01\/asp-net-dynamic-data-text-filter-search\/\",\"name\":\"ASP.NET Dynamic Data - Text filter \/ Search - Appmire blog\",\"isPartOf\":{\"@id\":\"https:\/\/jeroentrappers.be\/site\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/jeroentrappers.be\/site\/2011\/03\/01\/asp-net-dynamic-data-text-filter-search\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/jeroentrappers.be\/site\/2011\/03\/01\/asp-net-dynamic-data-text-filter-search\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.trappers.tk\/site\/wp-content\/uploads\/2011\/03\/Filter.png\",\"datePublished\":\"2011-03-01T21:58:46+00:00\",\"dateModified\":\"2013-04-27T09:33:00+00:00\",\"author\":{\"@id\":\"https:\/\/jeroentrappers.be\/site\/#\/schema\/person\/937cade782e684eb82e0ad8bf3e7806f\"},\"breadcrumb\":{\"@id\":\"https:\/\/jeroentrappers.be\/site\/2011\/03\/01\/asp-net-dynamic-data-text-filter-search\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/jeroentrappers.be\/site\/2011\/03\/01\/asp-net-dynamic-data-text-filter-search\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/jeroentrappers.be\/site\/2011\/03\/01\/asp-net-dynamic-data-text-filter-search\/#primaryimage\",\"url\":\"http:\/\/www.trappers.tk\/site\/wp-content\/uploads\/2011\/03\/Filter.png\",\"contentUrl\":\"http:\/\/www.trappers.tk\/site\/wp-content\/uploads\/2011\/03\/Filter.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/jeroentrappers.be\/site\/2011\/03\/01\/asp-net-dynamic-data-text-filter-search\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/jeroentrappers.be\/site\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ASP.NET Dynamic Data – Text filter \/ Search\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/jeroentrappers.be\/site\/#website\",\"url\":\"https:\/\/jeroentrappers.be\/site\/\",\"name\":\"Appmire blog\",\"description\":\"www.appmire.be\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/jeroentrappers.be\/site\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/jeroentrappers.be\/site\/#\/schema\/person\/937cade782e684eb82e0ad8bf3e7806f\",\"name\":\"Jeroen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/jeroentrappers.be\/site\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f73f0c93a26301ab27fc60b560e31d39?s=96&d=identicon&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f73f0c93a26301ab27fc60b560e31d39?s=96&d=identicon&r=g\",\"caption\":\"Jeroen\"},\"sameAs\":[\"https:\/\/www.google.com\/accounts\/o8\/id?id=AItOawmXjGgZm3xAvfuje3MqTSlqYJRFFcUn9Pk\"],\"url\":\"https:\/\/jeroentrappers.be\/site\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"ASP.NET Dynamic Data - Text filter \/ Search - Appmire blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/jeroentrappers.be\/site\/2011\/03\/01\/asp-net-dynamic-data-text-filter-search\/","og_locale":"en_US","og_type":"article","og_title":"ASP.NET Dynamic Data - Text filter \/ Search - Appmire blog","og_description":"I’ve implemented a Filter to apply on text fields in ASP.NET Dynamic Data websites. To use it: include the code in your project by putting it in the DynamicDataFilters folder. Then apply the filter to the field you want to enable filtering on using the FilterUIHint attribute. Example: [MetadataType(typeof(Category_MetaData))] public partial class Category { class...","og_url":"https:\/\/jeroentrappers.be\/site\/2011\/03\/01\/asp-net-dynamic-data-text-filter-search\/","og_site_name":"Appmire blog","article_published_time":"2011-03-01T21:58:46+00:00","article_modified_time":"2013-04-27T09:33:00+00:00","og_image":[{"url":"http:\/\/www.trappers.tk\/site\/wp-content\/uploads\/2011\/03\/Filter.png","type":"","width":"","height":""}],"author":"Jeroen","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Jeroen","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/jeroentrappers.be\/site\/2011\/03\/01\/asp-net-dynamic-data-text-filter-search\/","url":"https:\/\/jeroentrappers.be\/site\/2011\/03\/01\/asp-net-dynamic-data-text-filter-search\/","name":"ASP.NET Dynamic Data - Text filter \/ Search - Appmire blog","isPartOf":{"@id":"https:\/\/jeroentrappers.be\/site\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jeroentrappers.be\/site\/2011\/03\/01\/asp-net-dynamic-data-text-filter-search\/#primaryimage"},"image":{"@id":"https:\/\/jeroentrappers.be\/site\/2011\/03\/01\/asp-net-dynamic-data-text-filter-search\/#primaryimage"},"thumbnailUrl":"http:\/\/www.trappers.tk\/site\/wp-content\/uploads\/2011\/03\/Filter.png","datePublished":"2011-03-01T21:58:46+00:00","dateModified":"2013-04-27T09:33:00+00:00","author":{"@id":"https:\/\/jeroentrappers.be\/site\/#\/schema\/person\/937cade782e684eb82e0ad8bf3e7806f"},"breadcrumb":{"@id":"https:\/\/jeroentrappers.be\/site\/2011\/03\/01\/asp-net-dynamic-data-text-filter-search\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jeroentrappers.be\/site\/2011\/03\/01\/asp-net-dynamic-data-text-filter-search\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jeroentrappers.be\/site\/2011\/03\/01\/asp-net-dynamic-data-text-filter-search\/#primaryimage","url":"http:\/\/www.trappers.tk\/site\/wp-content\/uploads\/2011\/03\/Filter.png","contentUrl":"http:\/\/www.trappers.tk\/site\/wp-content\/uploads\/2011\/03\/Filter.png"},{"@type":"BreadcrumbList","@id":"https:\/\/jeroentrappers.be\/site\/2011\/03\/01\/asp-net-dynamic-data-text-filter-search\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/jeroentrappers.be\/site\/"},{"@type":"ListItem","position":2,"name":"ASP.NET Dynamic Data – Text filter \/ Search"}]},{"@type":"WebSite","@id":"https:\/\/jeroentrappers.be\/site\/#website","url":"https:\/\/jeroentrappers.be\/site\/","name":"Appmire blog","description":"www.appmire.be","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jeroentrappers.be\/site\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/jeroentrappers.be\/site\/#\/schema\/person\/937cade782e684eb82e0ad8bf3e7806f","name":"Jeroen","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jeroentrappers.be\/site\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/f73f0c93a26301ab27fc60b560e31d39?s=96&d=identicon&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f73f0c93a26301ab27fc60b560e31d39?s=96&d=identicon&r=g","caption":"Jeroen"},"sameAs":["https:\/\/www.google.com\/accounts\/o8\/id?id=AItOawmXjGgZm3xAvfuje3MqTSlqYJRFFcUn9Pk"],"url":"https:\/\/jeroentrappers.be\/site\/author\/admin\/"}]}},"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1Ezsm-4e","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/jeroentrappers.be\/site\/wp-json\/wp\/v2\/posts\/262","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jeroentrappers.be\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jeroentrappers.be\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jeroentrappers.be\/site\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jeroentrappers.be\/site\/wp-json\/wp\/v2\/comments?post=262"}],"version-history":[{"count":13,"href":"https:\/\/jeroentrappers.be\/site\/wp-json\/wp\/v2\/posts\/262\/revisions"}],"predecessor-version":[{"id":495,"href":"https:\/\/jeroentrappers.be\/site\/wp-json\/wp\/v2\/posts\/262\/revisions\/495"}],"wp:attachment":[{"href":"https:\/\/jeroentrappers.be\/site\/wp-json\/wp\/v2\/media?parent=262"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jeroentrappers.be\/site\/wp-json\/wp\/v2\/categories?post=262"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jeroentrappers.be\/site\/wp-json\/wp\/v2\/tags?post=262"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}