﻿<?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 » Issues  » ListBox.ValueMember always returns "value"</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:24:17 GMT</lastBuildDate><ttl>20</ttl><item><title>ListBox.ValueMember always returns "value"</title><link>http://forum.strataframe.net/FindPost3937.aspx</link><description>I'm trying to use your ListBox control (winform) and when I access the ValueMember property, the value is always "value".  I have it setup to CopyDataFrom() and have set the ValueMember in the PopulationDataSourceSettings. It is hitting a business object that is correctly populated.  How do I get the current value for the selected item within the list?</description><pubDate>Mon, 30 Oct 2006 15:15:48 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: ListBox.ValueMember always returns "value"</title><link>http://forum.strataframe.net/FindPost3997.aspx</link><description>Exactly...that is why we had not yet run into this :)</description><pubDate>Mon, 30 Oct 2006 15:15:48 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: ListBox.ValueMember always returns "value"</title><link>http://forum.strataframe.net/FindPost3995.aspx</link><description>Cool.  I set RawText via code and it works! This is much more realistic usage in any case (or binding to data).</description><pubDate>Mon, 30 Oct 2006 15:14:39 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: ListBox.ValueMember always returns "value"</title><link>http://forum.strataframe.net/FindPost3975.aspx</link><description>After looking at your sample a little closer, there is a workaround which will save us both some time.&amp;nbsp; If you take the exact same test and have it bound to data, it works.&amp;nbsp; Also, if you set the RawText property through code, it works.&amp;nbsp; The only time there is an issue is when the Text property is set within the designer.&amp;nbsp; So, to work around the problem, just set the RawText property in code or bind the control to a business object field and this will resolve the behavior you're encountering.</description><pubDate>Mon, 30 Oct 2006 13:40:46 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: ListBox.ValueMember always returns "value"</title><link>http://forum.strataframe.net/FindPost3971.aspx</link><description>Oops. Sorry. Posted this reply to wrong topic! &lt;br&gt;
&lt;br&gt;
However, on the original topic, the ValueMember sets the column that the SelectedValue property returns at runtime (not the Tag property).  It's right there in the help file!  DOH!  Anyway it is working fine now.&lt;br&gt;</description><pubDate>Mon, 30 Oct 2006 13:29:34 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: ListBox.ValueMember always returns "value"</title><link>http://forum.strataframe.net/FindPost3967.aspx</link><description>Thanks...that does reproduce the behavior you were explaining.&amp;nbsp; We will take a look at this.&amp;nbsp;</description><pubDate>Mon, 30 Oct 2006 13:17:16 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: ListBox.ValueMember always returns "value"</title><link>http://forum.strataframe.net/FindPost3964.aspx</link><description>Here is the sample project.  In doing this, I decided to take a screen print. You can see the VS 2005 in background, with correct rendering and in for ground, the runtime version (first firstScreenPrint.bmp).  Right after I hit print screen though, the rendering was fixed (secondScreenPrint.bmp).  Minimizing and restoring the runtime didn't fix it though.</description><pubDate>Mon, 30 Oct 2006 13:10:17 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: ListBox.ValueMember always returns "value"</title><link>http://forum.strataframe.net/FindPost3941.aspx</link><description>If you are using the PopulationDataSourceSettings, the ValueMember defined in those settings is stored in the Tag property of the selected list item:&lt;/P&gt;&lt;P&gt;loValue = MyListView.SelectedItems(0).Tag</description><pubDate>Fri, 27 Oct 2006 23:47:03 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>