﻿<?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</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Mon, 08 Jun 2026 23:45:20 GMT</lastBuildDate><ttl>20</ttl><item><title>Listbox valueMember</title><link>http://forum.strataframe.net/FindPost604.aspx</link><description>I am trying to use your listbox. I have set the PopulationType to BusinessObject and set the PopulationDataSourceSettings including specifying the ValueMember. This does not fill in the valuemember property of the control and if try to set that directly the popup menu only offers none. upon Execution I get:&lt;br&gt;
&lt;br&gt;
InvalidOperationException&lt;br&gt;
	Cannot set the SelectedValue in a ListControl with an empty ValueMember.&lt;br&gt;
&lt;br&gt;
Source     : System&lt;br&gt;
&lt;br&gt;
Could you please straighten me out on this?</description><pubDate>Mon, 13 Mar 2006 14:57:00 GMT</pubDate><dc:creator>Daniel Essin</dc:creator></item><item><title>RE: Listbox valueMember</title><link>http://forum.strataframe.net/FindPost634.aspx</link><description>All listboxes have a DataSource, ValueMember, and DisplayMember as does a combo box.&amp;nbsp; To use those properties add something like this:&lt;/P&gt;&lt;P&gt;MyListBox.DisplayMember = "MyDisplayFieldName"&lt;BR&gt;MyListBox.ValueMember = "MyValueFieldName - Usually a PK of some sort"&lt;BR&gt;MyListBox.DataSource = MyBusinessObject.CurrentDataTable&lt;/P&gt;&lt;P&gt;That's it :)&lt;BR&gt;</description><pubDate>Mon, 13 Mar 2006 14:57:00 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Listbox valueMember</title><link>http://forum.strataframe.net/FindPost629.aspx</link><description>How would I set the DataSource, DisplayMember, and ValueMember properties?</description><pubDate>Mon, 13 Mar 2006 13:12:58 GMT</pubDate><dc:creator>Daniel Essin</dc:creator></item><item><title>RE: Listbox valueMember</title><link>http://forum.strataframe.net/FindPost626.aspx</link><description>There is more than one way to populate a list using a business object. The manual method which would entail you use the DataSource, DisplayMember, and ValueMember properties.&amp;nbsp; The other is to set the PopulationType to BusinessObject and set the PopulationDataSourceSettings property.&amp;nbsp; For an exmaple or a reference on how to do this, refer to this thread on the forum: &lt;A href="http://forum.strataframe.net/Topic596-6-1.aspx"&gt;http://forum.strataframe.net/Topic596-6-1.aspx&lt;/A&gt;&amp;nbsp;.&amp;nbsp; If this doesn't help let me know.</description><pubDate>Mon, 13 Mar 2006 12:42:51 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Listbox valueMember</title><link>http://forum.strataframe.net/FindPost617.aspx</link><description>I can't upload anything. It says that I have used 480 of 512 kb.</description><pubDate>Fri, 10 Mar 2006 19:10:57 GMT</pubDate><dc:creator>Daniel Essin</dc:creator></item><item><title>RE: Listbox valueMember</title><link>http://forum.strataframe.net/FindPost614.aspx</link><description>Daniel,&lt;/P&gt;&lt;P&gt;Could you please email the picture.&amp;nbsp; It was shurnk when added and there fore unreadable:D&amp;nbsp; Thanks.</description><pubDate>Fri, 10 Mar 2006 17:44:31 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Listbox valueMember</title><link>http://forum.strataframe.net/FindPost607.aspx</link><description>I have attached a screen-shot.&lt;br&gt;
&lt;br&gt;
The reset option is grayed-out on ValueMember.&lt;br&gt;
&lt;br&gt;
I am also unclear about needing to set the BusinessObject property and the DataSource property. It seems like setting the businessObject would be sufficient. In any case I have tried it with and without the datasource being set and the control comes up empty.&lt;br&gt;
&lt;br&gt;
I am populating a c1TrueDataGrid simultaneously from the same BO as a test and it displays data.</description><pubDate>Wed, 08 Mar 2006 15:49:32 GMT</pubDate><dc:creator>Daniel Essin</dc:creator></item><item><title>RE: Listbox valueMember</title><link>http://forum.strataframe.net/FindPost605.aspx</link><description>Within the population data source settings, set the Value Member to whatever field you want to use as the selected value.  Then, in the property sheet for the ListControl, right-click the ValueMember property name and select "Reset" from the context menu.  When the list is populated at runtime, the ValueMember property will be dynamically set to the name of the dynamically created DataTable that is used as the list source.&lt;br&gt;
&lt;br&gt;
Also, make sure the "Value Member" within the PopulationDataSourceSettings dialog is set to the name of a valid field on the business object.&lt;br&gt;
&lt;br&gt;
If resetting the ValueMember property doesn't work, then make sure you're not setting the ValueMember anywhere in code.  If that still does not work, post some screenshots of your configurations, and maybe I can make something of it.</description><pubDate>Wed, 08 Mar 2006 14:18:21 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item></channel></rss>