<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : populating and saving checklistbox data</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : populating and saving checklistbox data</description>
  <pubDate>Sun, 26 Apr 2026 23:47:30 -700</pubDate>
  <lastBuildDate>Fri, 09 May 2008 09:24:48 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=802</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>populating and saving checklistbox data : I am not sure than I completely...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=802&amp;PID=2949#2949</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=23" rel="nofollow">davidklitzke</a><br /><strong>Subject:</strong> 802<br /><strong>Posted:</strong> 09-May-2008 at 9:24am<br /><br /><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">I am not sure than I completely understand the problem.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>I think I understand the Business Object for luEthnicity but, I really don’t understand what you mean by</SPAN><SPAN style="COLOR: navy"><FONT size=3><FONT face="Times New Roman"> the list of valid ethnicities for the person.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>Isn’t this just any one of the instances of the luEthnicity?<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>However, it seems like you may be suggesting that a person could belong to more than one Ethnicity.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>This is fine, but while I may belong to Ethnicity A and E, Ethnicity A may be incompatible with Ethnicity B and I may belong to either Ethnicity A or Ethnicity B, but not both.<?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></FONT></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="COLOR: navy"><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="COLOR: navy"><FONT size=3><FONT face="Times New Roman">I’d also like to know how you are storing this information in the database.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>For example does each Person object have a child collection of Assigned-Ethnicitiy objects.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>Each Assigned-Ethnicity object has a foreign key reference to Person and a foreign key reference to Ethnicity.<o:p></o:p></FONT></FONT></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="COLOR: navy"><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="COLOR: navy"><FONT size=3><FONT face="Times New Roman">Maybe an example would help,<o:p></o:p></FONT></FONT></SPAN></P>]]>
   </description>
   <pubDate>Fri, 09 May 2008 09:24:48 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=802&amp;PID=2949#2949</guid>
  </item> 
  <item>
   <title>populating and saving checklistbox data : I am new to both DevForce and...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=802&amp;PID=2944#2944</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=283" rel="nofollow">ShoshanahB</a><br /><strong>Subject:</strong> 802<br /><strong>Posted:</strong> 08-May-2008 at 3:46pm<br /><br /><P>I am new to both DevForce and Winforms, and am stumped on what seems like a fairly simple operation.&nbsp; </P><DIV>I have a checklistbox control that needs to display a set of Ethnicities, with the valid ethnicities for the selected person. The ethnicities available are stored in a&nbsp;business object called luEthnicity, and the list of valid ethnicities for the person is stored&nbsp;in&nbsp;another business object called buPerson_Ethnicity_Assignments.</DIV><DIV>&nbsp;</DIV><DIV>I have&nbsp;created and populated two BindingSource&nbsp;objects to handle the business objects (bsEthnicities and bsAssignedEthnicities respectively).</DIV><DIV>&nbsp;</DIV><DIV>I found that it is simple to display the available items by setting the checkboxlist's&nbsp;DataSource to bsEthnicities, and then identifying the DisplayMember and ValueMember.</DIV><DIV>&nbsp;</DIV><DIV>Based on my google searches, it looks like I must manually&nbsp;populate and save&nbsp;the checkboxlist's selected values.</DIV><DIV>&nbsp;</DIV><DIV>Before I start building a tool for this, I wanted to see if a) there is a&nbsp;cool tool&nbsp;or code example for these processes, and b) confirm that my general&nbsp;approach will work&nbsp;in the DevForce object model.</DIV><DIV>&nbsp;</DIV><DIV>Here's what I think is needed:</DIV><UL><LI>On Page Load, loop through each buPerson_Ethnicity_Assignment&nbsp;for the selected person.&nbsp; For each assigned ethnicity, use the&nbsp; <SPAN style="COLOR: black">SetItemChecked&nbsp;function to&nbsp;</SPAN>check the corresponding value in the checkboxlist.&nbsp; <LI>&nbsp; <LI>When saving the page, loop through each checked item in the checkboxlist, and insert a new record into bsAssignedEthnicities for any newly selected ethnicities.&nbsp; </LI></UL><DIV>&nbsp;</DIV><DIV>Some questions:</DIV><DIV>1. Is there an easier way?&nbsp; This seems like such a common activity, I'm suprised there isn't a code block somewhere.&nbsp; Perhaps I've become&nbsp;spoiled by the DevForce binding managers.&nbsp; :)</DIV><DIV>&nbsp;</DIV><DIV>2. &nbsp; When adding new assigned records, do I insert into the bsAssignedEthnicities, or add directly to the buPerson_Ethnicity_Assignments object?&nbsp; If I go direct, could you direct me to a tutorial or documentation on how to do this?</DIV><DIV>&nbsp;</DIV><DIV>thanks in advance for you help,</DIV><DIV>&nbsp;</DIV><DIV>~ Shanah</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><span style="font-size:10px"><br /><br />Edited by ShoshanahB - 08-May-2008 at 3:46pm</span>]]>
   </description>
   <pubDate>Thu, 08 May 2008 15:46:19 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=802&amp;PID=2944#2944</guid>
  </item> 
 </channel>
</rss>