﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WinForms (How do I?)  » Grid column formatting</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 13:16:16 GMT</lastBuildDate><ttl>20</ttl><item><title>Grid column formatting</title><link>http://forum.strataframe.net/FindPost1712.aspx</link><description>I am using the Inherited UI controls, particularly the Enhanced List.&amp;nbsp; Is there a&amp;nbsp; way to format a boolean to show up in the column as Yes/No instead of True/False?&amp;nbsp; Also, I am having trouble formatting a date column.&amp;nbsp; I want it to be 07/03/2006, but instead it is showing up as 07/03/2006 12:00:00 AM.&amp;nbsp; I have DateTime selected as FormatType and 'd' as FormatString.&amp;nbsp; Should I be doing something else?</description><pubDate>Mon, 03 Jul 2006 16:21:38 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: Grid column formatting</title><link>http://forum.strataframe.net/FindPost1715.aspx</link><description>No, there isn't a way to do that for only one enum value.&amp;nbsp; The only thing you might try is to add the AERequired to the EnumItemsToOmit property and add a TopMostItem of AERequired.&amp;nbsp; Then, it will effectively remove the AERequired from the "enums" portion of the list and re-add it to the top of the list through the TopMostItem.&amp;nbsp; That's the only way I can think to do it.&lt;P&gt;You can always handle the ParentFormLoading event of the combo because that event fires directly after it has been populated with the enum.&amp;nbsp; Then, you could alter the data within the combo's DataSource property, which comes out as a DataTable with two columns, one for display, one for the value behind.&amp;nbsp; You would just need to modify the display value... However, this method gets a little nitty gritty, so don't blow your fingers off :)</description><pubDate>Mon, 03 Jul 2006 16:21:38 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Grid column formatting</title><link>http://forum.strataframe.net/FindPost1714.aspx</link><description>Great, that works perfectly.&amp;nbsp; One more along those same lines...&lt;/P&gt;&lt;P&gt;I have an enum like the following:&lt;/P&gt;&lt;P&gt;Public Enum VerifyCode&lt;BR&gt;&amp;nbsp; OkToApprove&lt;BR&gt;&amp;nbsp; CannotApprove&lt;BR&gt;&amp;nbsp; AERequired&lt;BR&gt;End Enum&lt;/P&gt;&lt;P&gt;I want to use this enum to populate a combo, which I know how to do.&amp;nbsp; I also set the PascalCase to true, so they show up correctly.&amp;nbsp; I get "Ok To Approve" and Cannot Approve", but I want the last one to show up as "A/E Required".&amp;nbsp; Is there anyway to override the display value for only one enum value like this?&lt;/P&gt;&lt;P&gt;&lt;BR&gt;&amp;nbsp;</description><pubDate>Mon, 03 Jul 2006 15:11:03 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: Grid column formatting</title><link>http://forum.strataframe.net/FindPost1713.aspx</link><description>On the True/False options, you can configure the column to PopulateThroughEvent rather than FormattedString and set the actual value within the RowPopulating event of the EnhancedList.&amp;nbsp; So, rather than setting the display format to "{3}" (or whatever the column index is), you go to the RowPopulating event and set the value within it like so:&lt;P&gt;If CType(e.BusinessObject, MyBoType).TestValue Then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; e.Values(3).DisplayValue = "Yes"&lt;BR&gt;Else&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; e.Values(3).DisplayValue = "No"&lt;BR&gt;End If&lt;/P&gt;&lt;P&gt;As for the datetime formatting issue, you're best bet is going to be to leave the column's type as a string and change the "{2}" to "{2:d}".&amp;nbsp; You can add whatever formatting specifier is necessary after the :&amp;nbsp; So, if you need to format a number with a comma in the thousand's place, it would be "{2:n3}".&amp;nbsp;&amp;nbsp;You can find more information by searching for String.Format() in the Visual Studio help.&amp;nbsp; My link to the document is:&lt;/P&gt;[url]ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_csref/html/120ba537-4448-4c62-8676-7a8fdd98f496.htm[/url]&amp;nbsp; (open up your VS help and paste that into the URL blank)</description><pubDate>Mon, 03 Jul 2006 12:48:58 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item></channel></rss>