﻿<?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 » WinForms (How do I?)  » Combo Question</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Sat, 12 Sep 2026 02:01:11 GMT</lastBuildDate><ttl>20</ttl><item><title>Combo Question</title><link>http://forum.strataframe.net/FindPost15095.aspx</link><description>I have a combo and I am able to successfully fill it utilizing a datatable. I also have it attache to a BO and Column.&amp;nbsp;The problem is that I am not able to populating the bo?&lt;/P&gt;&lt;P&gt;*********************&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;P&gt;Private&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; PopulateReminderCombo()&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Dim&lt;/FONT&gt;&lt;FONT size=2&gt; loTable &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;FONT size=2&gt; DataTable()&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Dim&lt;/FONT&gt;&lt;FONT size=2&gt; loRow &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; DataRow&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;'-- Create the table structure&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;loTable.Columns.Add(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Display"&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;GetType&lt;/FONT&gt;&lt;FONT size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;String&lt;/FONT&gt;&lt;FONT size=2&gt;))&lt;/P&gt;&lt;P&gt;loTable.Columns.Add(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"DropDown"&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;GetType&lt;/FONT&gt;&lt;FONT size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;String&lt;/FONT&gt;&lt;FONT size=2&gt;))&lt;/P&gt;&lt;P&gt;loTable.Columns.Add(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Value"&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;GetType&lt;/FONT&gt;&lt;FONT size=2&gt;(TimeSpan))&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;'-- Add some rows&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;loRow = loTable.NewRow()&lt;/P&gt;&lt;P&gt;loRow.Item(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Display"&lt;/FONT&gt;&lt;FONT size=2&gt;) = &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"0 minutes"&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;loRow.Item(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"DropDown"&lt;/FONT&gt;&lt;FONT size=2&gt;) = &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"0 minutes"&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;loRow.Item(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Value"&lt;/FONT&gt;&lt;FONT size=2&gt;) = (&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;FONT size=2&gt; TimeSpan(0, 5, 0))&lt;/P&gt;&lt;P&gt;loTable.Rows.Add(loRow)&lt;/P&gt;&lt;P&gt;loRow = loTable.NewRow()&lt;/P&gt;&lt;P&gt;loRow.Item(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Display"&lt;/FONT&gt;&lt;FONT size=2&gt;) = &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"5 minutes"&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;loRow.Item(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"DropDown"&lt;/FONT&gt;&lt;FONT size=2&gt;) = &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"5 minutes"&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;loRow.Item(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Value"&lt;/FONT&gt;&lt;FONT size=2&gt;) = (&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;FONT size=2&gt; TimeSpan(0, 5, 0))&lt;/P&gt;&lt;P&gt;loTable.Rows.Add(loRow)&lt;/P&gt;&lt;P&gt;*******************************************&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;' Me.cboReminder.Items.Clear()&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;'-- Associate the table with the combos data source&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;cboReminder.DataSource = loTable&lt;/P&gt;&lt;P&gt;cboReminder.DisplayMember = &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Display"&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;cboReminder.ValueMember = &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Value"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#a31515 size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#a31515 size=2&gt;&amp;nbsp;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;</description><pubDate>Mon, 24 Mar 2008 11:15:54 GMT</pubDate><dc:creator>Michael Reese</dc:creator></item><item><title>RE: Combo Question</title><link>http://forum.strataframe.net/FindPost15135.aspx</link><description>[quote]This one is just not getting the timespan value?[/quote]&lt;/P&gt;&lt;P&gt;Gothca....so do you have the value member field in the BO coming back as a time span?&amp;nbsp; You might consider creating a custom property on the BO from which you are populating which returns a TimeSpan value like you are doing in your manual sample, this way you are ensured that it is typed as a TimeSpan.</description><pubDate>Mon, 24 Mar 2008 11:15:54 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Combo Question</title><link>http://forum.strataframe.net/FindPost15134.aspx</link><description>Sure, &lt;/P&gt;&lt;P&gt;In a nutshell, when&amp;nbsp; I update the form, the column value attached to the timespan combo is not being saved? I have a ton of combos enums, and others in the application which are fine. This one is just not getting the timespan value?&lt;/P&gt;&lt;P&gt;Michael</description><pubDate>Mon, 24 Mar 2008 10:22:17 GMT</pubDate><dc:creator>Michael Reese</dc:creator></item><item><title>RE: Combo Question</title><link>http://forum.strataframe.net/FindPost15131.aspx</link><description>[quote]The problem is that I am not able to populating the bo?[/quote]&lt;/P&gt;&lt;P&gt;Well, let's dig a little deeper...this is the ONLY way I generally ever populate a combo, so give me some more details or post a quick sample so we can see what you might be doing that is not working for you.&amp;nbsp; Also, there are quite a few samples throughout the different samples that does this, so you might want to look at these as well.</description><pubDate>Mon, 24 Mar 2008 09:40:41 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>