﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » .NET Forums » General .NET Discussion  » Regarding the FormatString Properties</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 00:01:45 GMT</lastBuildDate><ttl>20</ttl><item><title>Regarding the FormatString Properties</title><link>http://forum.strataframe.net/FindPost22326.aspx</link><description>Hi,&lt;/P&gt;&lt;P&gt;is it possible to write a FormatString that only puts a whitespace in case the next field is not empty ?&lt;/P&gt;&lt;P&gt;My FormatString looks like this:&lt;/P&gt;&lt;P&gt;{1} {2}, {5}-{3} {4}&lt;/P&gt;&lt;P&gt;1= Adressfield1, 2=Adressfield2, 5=CountryShortcut, 3=postal code, 4=city&lt;/P&gt;&lt;P&gt;however, the field Adressfield2 may or may not have a value, and thus if it doesnt have a value,&lt;/P&gt;&lt;P&gt;the whitespace infront of it needs to go.&lt;/P&gt;&lt;P&gt;any ideas ?&lt;/P&gt;&lt;P&gt;thanks.</description><pubDate>Thu, 12 Mar 2009 09:25:42 GMT</pubDate><dc:creator>Philipp Guntermann</dc:creator></item><item><title>RE: Regarding the FormatString Properties</title><link>http://forum.strataframe.net/FindPost22333.aspx</link><description>i see&lt;/P&gt;&lt;P&gt;thanks.</description><pubDate>Thu, 12 Mar 2009 09:25:42 GMT</pubDate><dc:creator>Philipp Guntermann</dc:creator></item><item><title>RE: Regarding the FormatString Properties</title><link>http://forum.strataframe.net/FindPost22330.aspx</link><description>You will have to take this into account yourself.&amp;nbsp; We have a DataHalpers static (shared) class that we have do all of this for us.&amp;nbsp; SO when we have an address or name, we pass it over to these methods and it takes care of it for us.&amp;nbsp; If we need it in a list, etc, then we will either handle the RowPopulating event or create a custom property on the BO that calls this method for us.&lt;/P&gt;&lt;P&gt;[codesnippet]DataHelpers.FormatAddress(Add1, Add2, City, StateOrProvince, Postal)[/codesnippet]</description><pubDate>Thu, 12 Mar 2009 09:10:53 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>