﻿<?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 » WebForms (How do I?)  » Problem with Dropdown List on webform if bound BO has no records</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 00:57:26 GMT</lastBuildDate><ttl>20</ttl><item><title>Problem with Dropdown List on webform if bound BO has no records</title><link>http://forum.strataframe.net/FindPost29970.aspx</link><description>Hi,&lt;br/&gt;&lt;br/&gt;I have a webform &amp;nbsp;for maintaining users that contains 2 dropdown lists for selection: &lt;strong&gt;lstCustomers&lt;/strong&gt; and &lt;strong&gt;lstUsers&lt;/strong&gt;, and a third dropdown list &lt;strong&gt;lstUserType&amp;nbsp;&amp;nbsp;&lt;/strong&gt;populated from boUserType&amp;nbsp;which displays the type of the selected user.&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;lstCustomers&lt;/strong&gt; is populated from BO boCustomers and &lt;strong&gt;lstUsers&lt;/strong&gt; is populated with users for the selected customer&amp;nbsp;from lstCustomers&amp;nbsp;using BO &amp;nbsp;boUsers.&lt;br/&gt;&lt;br/&gt;In the selection changed event&amp;nbsp;for&lt;strong&gt; lstCustomers&lt;/strong&gt;&amp;nbsp;I repopulate boUsers and refresh the display of &lt;strong&gt;lstUsers&lt;/strong&gt;.&lt;br/&gt;&lt;br/&gt;All is working fine except for when I select a customer&amp;nbsp;that has no users. In this case I get an error &lt;span style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium 'Times New Roman'; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"&gt;&lt;span style="FONT-FAMILY: Verdana; font-size: 11px"&gt;&lt;br/&gt;&lt;br/&gt;&lt;h2&gt;&lt;span style="font-style: italic;"&gt;&lt;font size=4&gt;lstUserType' has a SelectedValue which is invalid because it does not exist in the list of items&lt;/font&gt;.&lt;/span&gt;&lt;/h2&gt;&lt;/span&gt;&lt;/span&gt;&lt;font color=#000088&gt;Any suggestions on how to get around this most greatfully received,&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&lt;font color=#000088&gt;TIA &lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&lt;font color=#000088&gt;Andy&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&lt;font color=#000088&gt;&lt;/font&gt;&amp;nbsp;</description><pubDate>Wed, 11 May 2011 12:50:48 GMT</pubDate><dc:creator>Andrew Harper</dc:creator></item><item><title>RE: Problem with Dropdown List on webform if bound BO has no records</title><link>http://forum.strataframe.net/FindPost29973.aspx</link><description>I'm thinking that the user type combo has a value that is appropriate for the situation where this is no customer, but you haven't handled that case, likely in populating the user type combo. I haven't done this in a while, but I think the TopMostItem on the user type combo to match the value when there is no customer. That's where I'd start.</description><pubDate>Wed, 11 May 2011 12:50:48 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item></channel></rss>