﻿<?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?)  » Substituting Values or Controls in Listview</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 05:49:36 GMT</lastBuildDate><ttl>20</ttl><item><title>Substituting Values or Controls in Listview</title><link>http://forum.strataframe.net/FindPost2692.aspx</link><description>I have a listview populated at the with CopyDataFrom. There is one field that is a bit, I would like to show either a checkbox with the correct checked status, a 'Y' or 'N' character, or an image (red X, green check) instead of the 0 or 1 value in the table.&lt;br&gt;
&lt;br&gt;
Can this be done and can you point me in the right direction?</description><pubDate>Fri, 08 Sep 2006 08:59:44 GMT</pubDate><dc:creator>Keith Chisarik</dc:creator></item><item><title>RE: Substituting Values or Controls in Listview</title><link>http://forum.strataframe.net/FindPost2695.aspx</link><description>You can only show an image for the field if it is the first column in the list view (the icon column); in which case, you have to set the ImageKey or ImageIndex within the RowPopulating event of the listview.&amp;nbsp; As for displaying an alternate value, you will need to set the column to PopulatedThroughEvent within the PopulationDataSourceSettings.&amp;nbsp; Once that is set, you can manually specify the display value for the column through the RowPopulating event.&lt;/P&gt;&lt;P&gt;To sort a list, you will need to add a handler to the ColumnClick event of the list view and set the ListViewItemSorter property of the list view to a new instance of the MicroFour.StrataFrame.UI.Windows.Forms.ListViewColumnSorter class and specify the column and the direction to sort by.&amp;nbsp; You might also have to explicitly call Sort() on the listview, but I don't think so... it should automatically sort when you set the sorter.</description><pubDate>Fri, 08 Sep 2006 08:59:44 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Substituting Values or Controls in Listview</title><link>http://forum.strataframe.net/FindPost2693.aspx</link><description>Opps I forgot, I would also like to sort listview columns when I click the column header. This is all stuff I used to do standard in a VFP grid, I would like to be able to use SF controls whenever possible though.</description><pubDate>Thu, 07 Sep 2006 14:28:52 GMT</pubDate><dc:creator>Keith Chisarik</dc:creator></item></channel></rss>