﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebCombo - Setting Default Values for a Child WebCombo</title><link>http://www.intersoftsolutions.com/Community/WebCombo/Setting-Default-Values-for-a-Child-WebCombo/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>Setting Default Values for a Child WebCombo</title><link>http://www.intersoftsolutions.com/Community/WebCombo/Setting-Default-Values-for-a-Child-WebCombo/</link><pubDate>Fri, 29 Oct 2010 10:59:53 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Glad to hear that the &lt;strong&gt;LoadValue()&lt;/strong&gt; method helps.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Should you need further assistance or run into any problems regarding our controls, feel free to post it into our forum. We would be happy to assist you again.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Setting Default Values for a Child WebCombo</title><link>http://www.intersoftsolutions.com/Community/WebCombo/Setting-Default-Values-for-a-Child-WebCombo/</link><pubDate>Thu, 28 Oct 2010 18:30:19 GMT</pubDate><dc:creator>ellpan</dc:creator><description>&lt;p&gt;Yudi,&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt"&gt;"cbo2.LoadValue();" is what I didn't know about. It fixed the&amp;nbsp;problem.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt"&gt;Thank you!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt"&gt;&lt;/span&gt;&lt;br /&gt; &lt;/p&gt;</description></item><item><title>Setting Default Values for a Child WebCombo</title><link>http://www.intersoftsolutions.com/Community/WebCombo/Setting-Default-Values-for-a-Child-WebCombo/</link><pubDate>Thu, 28 Oct 2010 16:40:48 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Please try to add following code in the &lt;em&gt;OnAfterItemSelected&lt;/em&gt; client-side event of the parent WebCombo, for example cbo1 (the parent WebCombo of cbo2).&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;span style="font-family: 'consolas', 'courier new'; color: blue; font-size: 9pt"&gt;function&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt"&gt;onCbo1SelChange(controlId) {&lt;/span&gt;
    &lt;span style="font-family: 'consolas', 'courier new'; color: blue; font-size: 9pt"&gt;var&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt"&gt;cbo1 = ISGetObject(controlId);&lt;/span&gt;
    &lt;span style="font-family: 'consolas', 'courier new'; color: blue; font-size: 9pt"&gt;var&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt"&gt;cbo2 = ISGetObject(&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; color: #a31515; font-size: 9pt"&gt;"cbo2"&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt"&gt;);&lt;/span&gt;
            
    &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt"&gt;cbo2.SetText(&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; color: #a31515; font-size: 9pt"&gt;"Nancy"&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt"&gt;);&lt;/span&gt;
    &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt"&gt;cbo2.LoadValue();&lt;/span&gt;

    &lt;span style="font-family: 'consolas', 'courier new'; color: blue; font-size: 9pt"&gt;return true&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt"&gt;;
}&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;WebCombo provides a client-side method to set selected row in bound WebCombo, as shown in the snippet code above. The first step is to configure the WebCombo text by executing &lt;strong&gt;SetText(string)&lt;/strong&gt; method. After set the text of WebCombo, please remember to invoke &lt;strong&gt;LoadValue()&lt;/strong&gt; method, in order to instruct WebCombo to fetch the value of the correspond inserted text from the server. the &lt;strong&gt;LoadValue()&lt;/strong&gt; method is required for bound mode WebCombo, because when a new text is set, the WebCombo doesn’t have the related value in client-side since the data has not been loaded. This method is not required for unbound mode.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Hope this helps.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Setting Default Values for a Child WebCombo</title><link>http://www.intersoftsolutions.com/Community/WebCombo/Setting-Default-Values-for-a-Child-WebCombo/</link><pubDate>Thu, 28 Oct 2010 15:24:04 GMT</pubDate><dc:creator>ellpan</dc:creator><description>&lt;span style="font-family: 'arial','sans-serif'; font-size: 10pt"&gt;&lt;p style="margin: 0in 0in 0pt"&gt;&lt;span style="font-family: 'arial','sans-serif'; font-size: 10pt"&gt;I have three combo boxes: cbo1 is a Parent of cbo2 and cbo2 is a Parent of cbo3.  All combos are populated dynamically.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0in 0in 0pt"&gt;&lt;span style="font-family: 'arial','sans-serif'; font-size: 10pt"&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0in 0in 0pt"&gt;&lt;span style="font-family: 'arial','sans-serif'; font-size: 10pt"&gt;Everything works fine with cbo1: I can set the Default value on Load. The problem is with cbo2 and cbo3. After I select a value in cbo1, I use a function to set Default Value for cbo2:&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0in 0in 0pt"&gt;&lt;span style="font-family: 'arial','sans-serif'; font-size: 10pt"&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0in 0in 0pt"&gt;&lt;span style="font-family: 'arial','sans-serif'; font-size: 10pt"&gt;cbo1.LayoutSettings.ClientSideEvents.OnAfterItemSelected = &lt;span style="color: #a31515"&gt;"onCbo1SelChange"
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0in 0in 0pt"&gt;&lt;span style="font-family: 'arial','sans-serif'; font-size: 10pt"&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0in 0in 0pt"&gt;&lt;span style="font-family: 'arial','sans-serif'; font-size: 10pt"&gt;I tried to use two methods listed below in onCbo1SelChange to set the Default value, but both methods don't work:&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0in 0in 0pt"&gt;&lt;span style="font-family: 'arial','sans-serif'; color: darkgreen; font-size: 10pt"&gt;cbo2.SetSelectedRowByValue(Value);&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0in 0in 0pt"&gt;&lt;span style="font-family: 'arial','sans-serif'; color: darkgreen; font-size: 10pt"&gt;cbo2.SetSelectedIndex(id);&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0in 0in 0pt"&gt;&lt;span style="font-family: 'arial','sans-serif'; color: darkgreen; font-size: 10pt"&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0in 0in 0pt"&gt;&lt;span style="font-family: 'arial','sans-serif'; font-size: 10pt"&gt;If I use &lt;span style="color: green"&gt;cbo2.SetText(sText&lt;/span&gt;&lt;span style="color: #336600"&gt;)&lt;/span&gt;, the Default value is set correctly in cbo2, but cbo3 is empty. Cbo3 should get populated when a value is selected in cbo2. When I manually open cbo2 and select a value, then cbo3 is populated. &lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0in 0in 0pt"&gt;&lt;span style="font-family: 'arial','sans-serif'; font-size: 10pt"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin: 0in 0in 0pt"&gt;&lt;span style="font-family: 'arial','sans-serif'; font-size: 10pt"&gt;The problem exists only when I use a Bound method to populate the combos. If I use an Unbound method, everything works fine, but I cannot use Unbound method in this case. &lt;/span&gt;&lt;span style="font-family: 'arial','sans-serif'; font-size: 10pt"&gt;Please help.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0in 0in 0pt"&gt;
&lt;/p&gt;&lt;/span&gt;

&lt;p&gt; &lt;/p&gt;</description></item></channel></rss>