﻿<?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 » Enhancement Requests  » Reference Columns by name also in the ListView.RowPopulating</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 07:00:16 GMT</lastBuildDate><ttl>20</ttl><item><title>Reference Columns by name also in the ListView.RowPopulating</title><link>http://forum.strataframe.net/FindPost23348.aspx</link><description>It would be really helpful and safer to be able to reference a column by its name instead of the index in the ListView.RowPopulating event.  &lt;br&gt;
&lt;br&gt;
Ex Current code:&lt;br&gt;
[code][quote]&lt;br&gt;
 Private Sub VendorsBrowseDialog_RowPopulating(ByVal e As MicroFour.StrataFrame.UI.Windows.Forms.RowPopulatingEventArgs) Handles MyBase.RowPopulating&lt;br&gt;
            '-- Strong type the passed business object&lt;br&gt;
            With CType(e.BusinessObject, CardTrackingSystem.Business.bizVendor)&lt;br&gt;
                e.UseGroup = True&lt;br&gt;
                e.GroupHeaderText = MicroFour.StrataFrame.Tools.Common.GetEnumDisplayValue(.VendorType)&lt;br&gt;
&lt;br&gt;
                '-- Show the Inactive Status with a red color&lt;br&gt;
                If .IsInactive Then&lt;br&gt;
                    e.RowForeColor = Drawing.Color.Red&lt;br&gt;
                   [b] e.Values(4).DisplayValue = "Yes"[/b]&lt;br&gt;
                Else&lt;br&gt;
                   [b] e.Values(4).DisplayValue = String.Empty[/b]&lt;br&gt;
                End If&lt;br&gt;
            End With&lt;br&gt;
        End Sub&lt;br&gt;
[/quote][/code]&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Ex Suggested code:&lt;br&gt;
[code][quote]&lt;br&gt;
 Private Sub VendorsBrowseDialog_RowPopulating(ByVal e As MicroFour.StrataFrame.UI.Windows.Forms.RowPopulatingEventArgs) Handles MyBase.RowPopulating&lt;br&gt;
            '-- Strong type the passed business object&lt;br&gt;
            With CType(e.BusinessObject, CardTrackingSystem.Business.bizVendor)&lt;br&gt;
                e.UseGroup = True&lt;br&gt;
                e.GroupHeaderText = MicroFour.StrataFrame.Tools.Common.GetEnumDisplayValue(.VendorType)&lt;br&gt;
&lt;br&gt;
                '-- Show the Inactive Status with a red color&lt;br&gt;
                If .IsInactive Then&lt;br&gt;
                    e.RowForeColor = Drawing.Color.Red&lt;br&gt;
                   [b] e.Values("VendorIsInactive").DisplayValue = "Yes"[/b]&lt;br&gt;
                Else&lt;br&gt;
                   [b] e.Values("VendorIsInactive").DisplayValue = String.Empty[/b]&lt;br&gt;
                End If&lt;br&gt;
            End With&lt;br&gt;
        End Sub&lt;br&gt;
[/quote][/code]</description><pubDate>Thu, 04 Jun 2009 10:02:25 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item></channel></rss>