﻿<?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 - Complex Conditional Formatting And Dates</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Complex-Conditional-Formatting-And-Dates/</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>Complex Conditional Formatting And Dates</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Complex-Conditional-Formatting-And-Dates/</link><pubDate>Tue, 01 Sep 2009 00:27:14 GMT</pubDate><dc:creator>Glayaar</dc:creator><description>&lt;p&gt;The CustomConditionText will accept any ADO.NET expression. Based on this article on MSDN &lt;a href="http://msdn.microsoft.com/en-us/library/system.data.datacolumn.expression.aspx" target="_blank"&gt;DataColumn Expression&lt;/a&gt;, it seems ADO.NET does not accept Between or NotBetween keyword. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;The Between and NotBetween keyword is supported for single column format, for example &lt;br /&gt;&lt;/p&gt;&lt;pre&gt;ISNet.WebUI.WebGrid.WebGridFormatCondition fmt = new ISNet.WebUI.WebGrid.WebGridFormatCondition();&lt;br /&gt;fmt.Name = "condition4";&lt;br /&gt;fmt.Operator = ISNet.WebUI.WebGrid.ColumnFilterType.Between;&lt;br /&gt;fmt.ColumnMember = "OrderDate";&lt;br /&gt;fmt.ConditionText = "7/1/1996 and 7/18/1996";&lt;br /&gt;fmt.TargetObject = ISNet.WebUI.WebGrid.TargetObjectType.Row;&lt;br /&gt;fmt.FormatStyle.Font.Bold = true;&lt;br /&gt;fmt.FormatStyle.ForeColor = System.Drawing.Color.Green;&lt;br /&gt;fmt.Enabled = true;&lt;br /&gt;&lt;br /&gt;WebGrid1.RootTable.FormatConditions.Add(fmt);&lt;br /&gt;&lt;/pre&gt;
&lt;p&gt;The syntax will be similar for NotBetween operation&lt;br /&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item><item><title>Complex Conditional Formatting And Dates</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Complex-Conditional-Formatting-And-Dates/</link><pubDate>Wed, 26 Aug 2009 13:30:39 GMT</pubDate><dc:creator>PRISMAY</dc:creator><description>&lt;p&gt;I wanted to report that I did get some custom stuff to work.  For example, this works:&lt;/p&gt;&lt;span style="font-size: 10pt; color: #000000"&gt;&lt;span style="font-size: 10pt; color: #000000"&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; color: #4f81bd"&gt;"([reportRunStatusID] = 2) and ([dateSubmitted] &amp;lt;= [dataEndDate])"&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;And this works as well:&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; color: #4f81bd"&gt;"([reportRunStatusID] = 2) and ([dateSubmitted] &amp;gt;= '12 Aug 2009 12:29:14' and [dateSubmitted] &amp;lt;= '26 Aug 2009 12:29:14')"&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span size=" 0"&gt;I would still like to see detailed documentation on this please as I can't find all the available syntax for this.&amp;nbsp; Thank you.&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;</description></item><item><title>Complex Conditional Formatting And Dates</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Complex-Conditional-Formatting-And-Dates/</link><pubDate>Wed, 26 Aug 2009 11:27:43 GMT</pubDate><dc:creator>PRISMAY</dc:creator><description>&lt;p&gt;I'm also trying to find detailed documentation on what is and is not supported in the CustomConditionText.  I tried a SQL type condition below and got the error below.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;"[reportRunStatusID] = 1 and [dateSubmitted] between '12 Aug 2009 10:24:23' and '26 Aug 2009 10:24:23'"&lt;/strong&gt;&lt;/p&gt;&lt;em&gt;&lt;em&gt;&lt;span style="font-size: 11pt; color: #ff0000"&gt;&lt;p dir="ltr" style="margin-right: 0px"&gt;&lt;em&gt;The expression contains unsupported operator 'Between'.&lt;/em&gt;&lt;/p&gt;&lt;/span&gt;&lt;/em&gt;&lt;/em&gt;</description></item><item><title>Complex Conditional Formatting And Dates</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Complex-Conditional-Formatting-And-Dates/</link><pubDate>Wed, 26 Aug 2009 11:22:24 GMT</pubDate><dc:creator>PRISMAY</dc:creator><description>&lt;p&gt;I'm using the following custom condition to highlight a row based on the status of failed (1) and where something was submitted two weeks ago.  However, it doesn't do anything.  Can you help me identify what's wrong please?  I would also appreciate some complex examples of how to use the Between and NotBetween for boty Row and Cell types.  Thank you.&lt;/p&gt;&lt;pre&gt;   fmt = new ISNet.WebUI.WebGrid.WebGridFormatCondition();
   fmt.Name = "condition4";
   fmt.CustomConditionText = "[reportRunStatusID] = 1 and [dateSubmitted] &amp;gt; '" &amp;#43;
      DateTime.Now.AddDays(-14).ToString(PRISM.Xtensions.Date.CPRISMDate.CFmtDateTime.Std24) &amp;#43; "'";
   fmt.TargetObject = ISNet.WebUI.WebGrid.TargetObjectType.Row;
   fmt.FormatStyle.Font.Bold = true;
   fmt.FormatStyle.ForeColor = System.Drawing.Color.Green;
   fmt.Enabled = true;
&lt;/pre&gt;
&lt;p&gt;The custom condition evaluates, as of this morning, to this for example:&lt;br /&gt;&lt;strong&gt;"[reportRunStatusID] = 1 and [dateSubmitted] &amp;gt; '12 Aug 2009 10:14:52'"&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item></channel></rss>