﻿<?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 a row in Child combo after selecting a value in Parent combo</title><link>http://www.intersoftsolutions.com/Community/WebCombo/Setting-a-row-in-Child-combo-after-selecting-a-value-in-Parent-combo/</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 a row in Child combo after selecting a value in Parent combo</title><link>http://www.intersoftsolutions.com/Community/WebCombo/Setting-a-row-in-Child-combo-after-selecting-a-value-in-Parent-combo/</link><pubDate>Fri, 17 Dec 2010 15:04:07 GMT</pubDate><dc:creator>ellpan</dc:creator><description>&lt;p&gt;Hi Martin,&lt;/p&gt;
&lt;p&gt;I solved the problem. The error message was "Microsoft JScript runtime error: '_attrInit' is null or not an object". The reason was setting Timeout to 650, what was not enough. After I set it to 2000, everything started working fine.&lt;/p&gt;
&lt;p&gt;Thank you, Ellen&lt;/p&gt;</description></item><item><title>Setting a row in Child combo after selecting a value in Parent combo</title><link>http://www.intersoftsolutions.com/Community/WebCombo/Setting-a-row-in-Child-combo-after-selecting-a-value-in-Parent-combo/</link><pubDate>Thu, 16 Dec 2010 21:35:05 GMT</pubDate><dc:creator>MarTin</dc:creator><description>&lt;p&gt;Hello Ellen,&lt;/p&gt;
&lt;p&gt;Have you tried the attached sample provided in the previous post?&lt;/p&gt;
&lt;p&gt;In the sample, I'm using Category and Product tables. The controlID is basically the id of the 1st combo, which is wcCategory based on the sample.&lt;/p&gt;
&lt;p&gt;The sample works fine and the dropdown does open. You need to set focus to the combo before you open the dropdown. In my code, I'm using &lt;strong&gt;SetFocus()&lt;/strong&gt; and &lt;strong&gt;ShowDropDown()&lt;/strong&gt; methods.&lt;/p&gt;
&lt;p&gt;I have attached a short flash video that shows the result when I run the sample.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;</description></item><item><title>Setting a row in Child combo after selecting a value in Parent combo</title><link>http://www.intersoftsolutions.com/Community/WebCombo/Setting-a-row-in-Child-combo-after-selecting-a-value-in-Parent-combo/</link><pubDate>Thu, 16 Dec 2010 19:04:31 GMT</pubDate><dc:creator>ellpan</dc:creator><description>&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="font-family: calibri; font-size: 15px"&gt;Hi Martin,&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;p&gt;&lt;span style="font-family: calibri; font-size: 15px"&gt; &lt;/span&gt;&lt;/p&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="font-family: calibri; font-size: 15px"&gt;I tried the code (“&lt;/span&gt;&lt;span style="font-family: 'courier new'; color: #3f3f3f; font-size: 9pt; mso-fareast-font-family: 'times new roman'"&gt;var wcCategory = ISGetObject(controlId)” is not used) &lt;/span&gt;&lt;span style="font-family: calibri; font-size: 15px"&gt;and it has the same problem that I have been struggling with:&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="font-family: calibri; font-size: 15px"&gt;“&lt;/span&gt;&lt;span style="font-family: 'courier new'; color: #3f3f3f; font-size: 9pt; mso-fareast-font-family: 'times new roman'"&gt;wcProduct.ShowDropDown();” &lt;/span&gt;&lt;span style="font-family: calibri; font-size: 15px"&gt;doesn’t open dropdown, it only&lt;/span&gt;&lt;span style="font-family: 'verdana','sans-serif'; color: black; font-size: 9pt"&gt; shows DropDown symbol (as said in the Reference). The element Rows of wcProduct is still null and no row can be selected.
&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="font-family: 'verdana','sans-serif'; color: black; font-size: 9pt"&gt;
&lt;p&gt; &lt;/p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;span style="font-family: 'verdana','sans-serif'; color: black; font-size: 9pt"&gt;Thank you,
&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="line-height: 115%; font-family: 'verdana','sans-serif'; color: black; font-size: 9pt; mso-fareast-font-family: simsun; mso-fareast-theme-font: minor-fareast; mso-bidi-font-family: 'times new roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: en-us; mso-fareast-language: zh-cn; mso-bidi-language: ar-sa"&gt;Ellen&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Setting a row in Child combo after selecting a value in Parent combo</title><link>http://www.intersoftsolutions.com/Community/WebCombo/Setting-a-row-in-Child-combo-after-selecting-a-value-in-Parent-combo/</link><pubDate>Thu, 16 Dec 2010 03:53:31 GMT</pubDate><dc:creator>MarTin</dc:creator><description>&lt;p&gt;Hello Ellen,&lt;/p&gt;
&lt;p&gt;I have a workaround to implement SetSelectedIndex() by using the following code:&lt;/p&gt;&lt;pre&gt;function wcCategory_OnAfterItemSelected(controlId)
{
   var wcCategory = ISGetObject(controlId);
   var wcProduct = ISGetObject("wcProduct");

   wcProduct.SetFocus();
   wcProduct.ShowDropDown();
   window.setTimeout(function () { wcProduct.SetSelectedIndex(0); }, 650);
   return true;
}&lt;/pre&gt;
&lt;p&gt;The data in combo will not be populated before you open the dropdown. Therefore, this code works fine but it will let the dropdown opened. This is the workaround I found so far.&lt;/p&gt;
&lt;p&gt;Attached is the sample file for your reference. Hope this helps.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;</description></item><item><title>Setting a row in Child combo after selecting a value in Parent combo</title><link>http://www.intersoftsolutions.com/Community/WebCombo/Setting-a-row-in-Child-combo-after-selecting-a-value-in-Parent-combo/</link><pubDate>Wed, 15 Dec 2010 12:50:04 GMT</pubDate><dc:creator>ellpan</dc:creator><description>&lt;p style="margin: 0in 0in 0pt"&gt;&lt;span style="font-family: 'lucida sans unicode','sans-serif'; font-size: 10pt"&gt;Martin,
&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt"&gt;&lt;span style="font-family: 'lucida sans unicode','sans-serif'; font-size: 10pt"&gt;&amp;nbsp;
&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt"&gt;&lt;span style="font-family: 'lucida sans unicode','sans-serif'; font-size: 10pt"&gt;Thank you for replying. 
&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt"&gt;&lt;span style="font-family: 'lucida sans unicode','sans-serif'; font-size: 10pt"&gt;Is it possible to use &lt;span style="color: blue"&gt;combo.SetSelectedIndex(0) &lt;/span&gt;instead of &lt;span style="color: blue"&gt;SetText()?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt"&gt;&lt;span style="font-family: 'lucida sans unicode','sans-serif'; font-size: 10pt"&gt;Is there a simple way to select the first row?
&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt"&gt;&lt;span style="font-family: 'lucida sans unicode','sans-serif'; font-size: 10pt"&gt;
&lt;p&gt; &lt;/p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt"&gt;&lt;span style="font-family: 'lucida sans unicode','sans-serif'; font-size: 10pt"&gt;Thanks, Ellen.
&lt;/span&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item><item><title>Setting a row in Child combo after selecting a value in Parent combo</title><link>http://www.intersoftsolutions.com/Community/WebCombo/Setting-a-row-in-Child-combo-after-selecting-a-value-in-Parent-combo/</link><pubDate>Mon, 13 Dec 2010 02:42:35 GMT</pubDate><dc:creator>MarTin</dc:creator><description>&lt;p&gt;Hello Ellen,&lt;/p&gt;
&lt;p&gt;I believe you have to use linked combo in your scenario.&lt;/p&gt;
&lt;p&gt;You can still use &lt;strong&gt;SetText()&lt;/strong&gt; and &lt;strong&gt;LoadValue()&lt;/strong&gt; method. However, in order to display all values when you open the combo, you need to turn off the query handler. In &lt;strong&gt;LinkSettings&lt;/strong&gt;, you need to set &lt;strong&gt;SkipQueryTextField&lt;/strong&gt; to &lt;strong&gt;True&lt;/strong&gt;.&lt;/p&gt;&lt;pre&gt;&amp;lt;LinkSettings Enabled="True" ParentWebComboID="wcCategory" SkipQueryTextField="True" /&amp;gt;&lt;/pre&gt;

&lt;p&gt;By disabling this property, you will get all values when you open the combo.&lt;/p&gt;
&lt;p&gt;Hope this helps.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;</description></item><item><title>Setting a row in Child combo after selecting a value in Parent combo</title><link>http://www.intersoftsolutions.com/Community/WebCombo/Setting-a-row-in-Child-combo-after-selecting-a-value-in-Parent-combo/</link><pubDate>Thu, 09 Dec 2010 19:15:15 GMT</pubDate><dc:creator>ellpan</dc:creator><description>&lt;span style="font-family: 'lucida sans unicode', 'sans-serif'; font-size: 10pt"&gt;&lt;p style="margin: 0in 0in 0pt"&gt;&lt;span style="font-family: 'lucida sans unicode','sans-serif'; font-size: 10pt"&gt;Hi. I have bound Parent and Child combos. After I select a new value in Parent combo, I open Child combo and its new values are populated - what I need. I also need to programmatically display the 1st row in Child combo. I tried to use SetSelectedIndex(0):&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0in 0in 0pt"&gt;&lt;span style="font-family: 'lucida sans unicode','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: 'lucida sans unicode','sans-serif'; color: blue; font-size: 10pt"&gt;var combo = ISGetObject("WebCombo1");&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0in 0in 0pt"&gt;&lt;span style="font-family: 'lucida sans unicode','sans-serif'; color: blue; font-size: 10pt"&gt;combo.SetSelectedIndex(0);&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0in 0in 0pt"&gt;&lt;span style="font-family: 'lucida sans unicode','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: 'lucida sans unicode','sans-serif'; font-size: 10pt"&gt;but it doesn’t work, because “combo” has no rows (values are populated only after I manually open drop down). How to solve the problem?&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0in 0in 0pt"&gt;&lt;span style="font-family: 'lucida sans unicode','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: 'lucida sans unicode','sans-serif'; font-size: 10pt"&gt;If I use:&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0in 0in 0pt"&gt;&lt;span style="font-family: 'lucida sans unicode','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: 'lucida sans unicode','sans-serif'; color: blue; font-size: 10pt"&gt;combo.SetText(“…”);&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0in 0in 0pt"&gt;&lt;span style="font-family: 'lucida sans unicode','sans-serif'; color: blue; font-size: 10pt"&gt;combo.LoadValue();&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0in 0in 0pt"&gt;&lt;span style="font-family: 'lucida sans unicode','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: 'lucida sans unicode','sans-serif'; font-size: 10pt"&gt;only one value is loaded when I open the combo.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0in 0in 0pt"&gt;&lt;span style="font-family: 'lucida sans unicode','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: 'lucida sans unicode','sans-serif'; font-size: 10pt"&gt;Thanks. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: 'lucida sans unicode','sans-serif'; font-size: 10pt"&gt; &lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0in 0in 0pt"&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;</description></item></channel></rss>