﻿<?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 - how to select a value in webcombo 1 and autoshow the first result in webcombo 2</title><link>http://www.intersoftsolutions.com/Community/WebCombo/how-to-select-a-value-in-webcombo-1-and-autoshow-the-first-result-in-webcombo-2/</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>how to select a value in webcombo 1 and autoshow the first result in webcombo 2</title><link>http://www.intersoftsolutions.com/Community/WebCombo/how-to-select-a-value-in-webcombo-1-and-autoshow-the-first-result-in-webcombo-2/</link><pubDate>Tue, 20 Nov 2012 21:01:23 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;Glad to hear the good news.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;Should you need further assistance or run into any problems regarding our controls, feel free to post it into the community site. We would be happy to assist you again.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>how to select a value in webcombo 1 and autoshow the first result in webcombo 2</title><link>http://www.intersoftsolutions.com/Community/WebCombo/how-to-select-a-value-in-webcombo-1-and-autoshow-the-first-result-in-webcombo-2/</link><pubDate>Tue, 20 Nov 2012 05:47:34 GMT</pubDate><dc:creator>macedes</dc:creator><description>&lt;p /&gt;&lt;p /&gt;
&lt;p /&gt;&lt;pre&gt;I found a solution, thanks anyway&lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;&lt;pre&gt; function WebCombo1_OnAfterItemSelected(controlId) {
            var WebCombo1 = ISGetObject("WebCombo1");
            var grid = ISGetObject("WebGrid1");
            grid.GetSelectedObject().ToRowObject().GetCell('NAME').SetText(WebCombo1.GetSelectedRow().cells[1].innerText, true);
            return true;
        }
&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;&lt;/pre&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;</description></item><item><title>how to select a value in webcombo 1 and autoshow the first result in webcombo 2</title><link>http://www.intersoftsolutions.com/Community/WebCombo/how-to-select-a-value-in-webcombo-1-and-autoshow-the-first-result-in-webcombo-2/</link><pubDate>Tue, 20 Nov 2012 04:21:46 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;I enclosed my test page as attachment to be evaluated on your end. Please try to change/modify the WebCombo’s selected row under &lt;strong&gt;Supplier-Company&lt;/strong&gt; or &lt;strong&gt;Supplier-ContactName&lt;/strong&gt; column and let us know whether this helps or not.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>how to select a value in webcombo 1 and autoshow the first result in webcombo 2</title><link>http://www.intersoftsolutions.com/Community/WebCombo/how-to-select-a-value-in-webcombo-1-and-autoshow-the-first-result-in-webcombo-2/</link><pubDate>Tue, 20 Nov 2012 02:47:14 GMT</pubDate><dc:creator>macedes</dc:creator><description>&lt;p&gt;i tried your solution. when i debug the page i can see that it saves the correct name in this line:&lt;/p&gt;&lt;p /&gt;&lt;pre style="font-size: 12px; white-space: pre-wrap; word-wrap: break-word; color: rgb(63, 63, 63); line-height: 18px;"&gt;gridCellCity.SetText(WebCombo2.GetSelectedRow().cells[1].innerText, true);&lt;/pre&gt;
&lt;p&gt;but the row is still empty. &lt;/p&gt;
&lt;p&gt;the datasource look like this:&lt;/p&gt;
&lt;p /&gt;&lt;pre&gt;        WebCombo1.DataSource = allUsers
        WebCombo1.DataTextField = "Trigram"
        WebCombo1.DataValueField = "Trigram"
        WebCombo1.DataBind()
        WebCombo2.DataSource = allUsers
        WebCombo2.DataTextField = "Name"
        WebCombo2.DataValueField = "Name"
        WebCombo2.DataBind()&lt;/pre&gt;
&lt;p&gt; And here are the functions:&lt;/p&gt;
&lt;p /&gt;&lt;pre&gt; function WebCombo1_OnAfterItemSelected(controlId) {
            var WebCombo1 = ISGetObject("WebCombo1");
            var WebCombo1_rowIdx = WebCombo1.GetSelectedRow().rowIndex;
            var grid = ISGetObject("WebGrid1");
            var gridRow = grid.GetSelectedObject().GetRowObject();
            var gridCell = gridRow.GetCells();
            var gridCellCity = gridCell.GetNamedItem("TRIGRAM");
            gridCellCity.SetText(WebCombo1.GetSelectedRow().cells[1].innerText, true);
            return true;
        }
        function WebCombo2_OnAfterItemSelected(controlId) {
            var WebCombo2 = ISGetObject("WebCombo2");
            var WebCombo2_rowIdx = WebCombo2.GetSelectedRow().rowIndex;
            var grid = ISGetObject("WebGrid1");
            var gridRow = grid.GetSelectedObject().GetRowObject();
            var gridCell = gridRow.GetCells();
            var gridCellCity = gridCell.GetNamedItem("NAME");
            gridCellCity.SetText(WebCombo2.GetSelectedRow().cells[1].innerText, true);
            return true;
        }&lt;/pre&gt;
&lt;p&gt;Webcombo 1&lt;/p&gt;
&lt;p /&gt;&lt;pre&gt;      &amp;lt;ISWebCombo:WebCombo ID="WebCombo1" runat="server" Height="20px" 
                UseDefaultStyle="True" Width="300px" DataMember=""&amp;gt;
                &amp;lt;LayoutSettings EntryMode="AutoComplete" AlwaysShowAllRowsOnDropdown="true" ComboMode="MultipleColumns"&amp;gt;
                &amp;lt;ClientSideEvents OnAfterItemSelected="WebCombo1_OnAfterItemSelected" /&amp;gt;
                &amp;lt;/LayoutSettings&amp;gt;
            &amp;lt;/ISWebCombo:WebCombo&amp;gt;&lt;/pre&gt;
&lt;p&gt; Webcombo 2&lt;/p&gt;
&lt;p /&gt;&lt;pre&gt;&amp;lt;ISWebCombo:WebCombo ID="WebCombo2" runat="server" UseDefaultStyle="True" 
             DataMember="" Height="20px" Width="300px"&amp;gt;
        &amp;lt;LayoutSettings EntryMode="AutoComplete" AlwaysShowAllRowsOnDropdown="true" ComboMode="MultipleColumns"&amp;gt;
        &amp;lt;/LayoutSettings&amp;gt;
         &amp;lt;/ISWebCombo:WebCombo&amp;gt;&lt;/pre&gt;
&lt;p&gt; Webgrid&lt;/p&gt;
&lt;p /&gt;&lt;pre&gt;  &amp;lt;ISWebGrid:WebGridColumn Caption="Trigram" DataMember="TRIGRAM" Name="TRIGRAM" 
                        EditType="WebComboNET" WebComboID="WebCombo1" Width="200px" meta:resourcekey="Trigram"&amp;gt;
                        &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;
                        &amp;lt;ISWebGrid:WebGridColumn Caption="Name" DataMember="NAME" Name="NAME"
                         EditType="WebComboNET" WebComboID="WebCombo2" Width="200px" meta:resourcekey="Name"
                            InputRequired="true"&amp;gt;
                        &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;</description></item><item><title>how to select a value in webcombo 1 and autoshow the first result in webcombo 2</title><link>http://www.intersoftsolutions.com/Community/WebCombo/how-to-select-a-value-in-webcombo-1-and-autoshow-the-first-result-in-webcombo-2/</link><pubDate>Tue, 20 Nov 2012 00:01:46 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;Thank you for your feedback.&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;I have modified my test page so that it would be compatible with a dynamic list. The key is that we need to have a multiple column WebCombo. Why multiple column WebCombo? Because we need to obtain the other column information of WebCombo’s selected row. For example: when user selects a name, we need to obtain the phone number of the selected person.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;After enable the multiple column feature of WebCombo, we can simplify the OnAfterItemSelected JavaScript function into the following.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;function WebCombo1_OnAfterItemSelected(controlId)
{
    var WebCombo1 = ISGetObject("WebCombo1");
    var WebCombo1_rowIdx = WebCombo1.GetSelectedRow().rowIndex;
    var grid = ISGetObject("WebGrid1");
    var gridRow = grid.GetSelectedObject().GetRowObject();
    var gridCell = gridRow.GetCells();
    var gridCellCity = gridCell.GetNamedItem("Supplier-ContactName");
    gridCellCity.SetText(WebCombo1.GetSelectedRow().cells[1].innerText, true);
    return true;
}
function WebCombo2_OnAfterItemSelected(controlId)
{
    var WebCombo2 = ISGetObject("WebCombo2");
    var WebCombo2_rowIdx = WebCombo2.GetSelectedRow().rowIndex;
    var grid = ISGetObject("WebGrid1");
    var gridRow = grid.GetSelectedObject().GetRowObject();
    var gridCell = gridRow.GetCells();
    var gridCellCity = gridCell.GetNamedItem("Supplier-PhoneNumber");
    gridCellCity.SetText(WebCombo2.GetSelectedRow().cells[1].innerText, true);
    return true;
}&lt;/pre&gt;
&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;Additionally, we can utilize the RenderOnHidden property of WebComboColumn to have WebCombo show a single column.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&amp;lt;ISWebCombo:WebCombo ID="WebCombo1" runat="server" DataSourceID="AccessDataSource2"
    DataTextField="CompanyName" DataValueField="SupplierID" Height="20px" UseDefaultStyle="True"
    Width="200px"&amp;gt;
    &amp;lt;LayoutSettings AlwaysShowAllRowsOnDropdown="true" ComboMode="MultipleColumns" &amp;gt;
        &amp;lt;ClientSideEvents OnAfterItemSelected="WebCombo1_OnAfterItemSelected" /&amp;gt;
    &amp;lt;/LayoutSettings&amp;gt;
    &amp;lt;Columns&amp;gt;
        &amp;lt;ISWebCombo:WebComboColumn BaseFieldName="PhoneNumber" HeaderText="PhoneNumber"
            Name="PhoneNumber" /&amp;gt;
        &amp;lt;ISWebCombo:WebComboColumn BaseFieldName="ContactName" Name="ContactName"
            RenderOnHidden="true" Hidden="true" /&amp;gt;
    &amp;lt;/Columns&amp;gt;
&amp;lt;/ISWebCombo:WebCombo&amp;gt;
&amp;lt;ISWebCombo:WebCombo ID="WebCombo2" runat="server" DataSourceID="AccessDataSource2"
    DataTextField="ContactName" DataValueField="SupplierID" Height="20px" UseDefaultStyle="True"
    Width="200px"&amp;gt;
    &amp;lt;LayoutSettings AlwaysShowAllRowsOnDropdown="true" ComboMode="MultipleColumns" &amp;gt;
        &amp;lt;ClientSideEvents OnAfterItemSelected="WebCombo2_OnAfterItemSelected" /&amp;gt;
    &amp;lt;/LayoutSettings&amp;gt;
    &amp;lt;Columns&amp;gt;
        &amp;lt;ISWebCombo:WebComboColumn BaseFieldName="ContactName" HeaderText="ContactName"
            Name="ContactName" /&amp;gt;
        &amp;lt;ISWebCombo:WebComboColumn BaseFieldName="PhoneNumber" Name="PhoneNumber"
            RenderOnHidden="true" Hidden="true" /&amp;gt;
    &amp;lt;/Columns&amp;gt;
&amp;lt;/ISWebCombo:WebCombo&amp;gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;Please let us know whether this helps or not.&lt;/span&gt;&lt;/p&gt;
</description></item><item><title>how to select a value in webcombo 1 and autoshow the first result in webcombo 2</title><link>http://www.intersoftsolutions.com/Community/WebCombo/how-to-select-a-value-in-webcombo-1-and-autoshow-the-first-result-in-webcombo-2/</link><pubDate>Mon, 19 Nov 2012 01:57:31 GMT</pubDate><dc:creator>macedes</dc:creator><description>&lt;p&gt;thanks for your help but how can i do that with a dynamic list? or a database?&lt;/p&gt;</description></item><item><title>how to select a value in webcombo 1 and autoshow the first result in webcombo 2</title><link>http://www.intersoftsolutions.com/Community/WebCombo/how-to-select-a-value-in-webcombo-1-and-autoshow-the-first-result-in-webcombo-2/</link><pubDate>Fri, 16 Nov 2012 01:34:02 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="color: rgb(31, 73, 125); "&gt;I made a simple sample of WebGrid based on the given information of your scenario. A WebGrid is bound to Products table of Northwind.mdb. In the RootTable, there are Supplier-Company column and Supplier-ContactName column. wcSupplierCompany and wcSupplierContactName WebCombo controls are assigned for each of those columns respectively.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: rgb(31, 73, 125); "&gt;When user select "Exotic Liquids" from wcSupplierCompany, then the text of SupplierContactName column is set to "Charlotte ". When user select "New Orleans Cajun Delights" from wcSupplierCompany, then the text of SupplierContactName column is set to "Shelley Burke". And so on.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(31, 73, 125); "&gt;Please try to use the OnAfterItemSelected of WebCombo's client-side event to set the value of another control such as shown in the following snippet code.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;function WebCombo1_OnAfterItemSelected(controlId)
{
    var WebCombo1 = ISGetObject("WebCombo1");
    var grid = ISGetObject("WebGrid1");
    var row = grid.GetSelectedObject().GetRowObject();
            
    if (WebCombo1.Text == "Exotic Liquids")
    {
        var cells = row.GetCells();
        var cellCity = cells.GetNamedItem("Supplier-ContactName");
        cellCity.SetText("Charlotte Cooper");
        cellCity.SetValue("Charlotte Cooper");
    }
    if (WebCombo1.Text == "New Orleans Cajun Delights")
    {
        var cells = row.GetCells();
        var cellCity = cells.GetNamedItem("Supplier-ContactName");
        cellCity.SetText("Shelley Burke");
        cellCity.SetValue("Shelley Burke");
    }
    if (WebCombo1.Text == "Grandma Kelly's Homestead")
    {
        var cells = row.GetCells();
        var cellCity = cells.GetNamedItem("Supplier-ContactName");
        cellCity.SetText("Regina Murphy");
        cellCity.SetValue("Regina Murphy");
    }
    return true;
}&lt;/pre&gt;
&lt;p&gt;&lt;span style="color: rgb(31, 73, 125); "&gt;Next, we can add the wcSupplierContactName_OnAfterItemSelected client-side event to set the value of Supplier-Company column.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(31, 73, 125); "&gt;Please allow me to suggest another approach for this kind of scenario. In my opinion, we can use the multiple column WebCombo as the Supplier column's EditType. By enabling the multiple column feature of WebCombo, user can see the detail information of Supplier in a WebCombo.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(31, 73, 125); "&gt;You may also try to set the AdditionalSearchField of WebCombo to provide user a convenient way to search more than one data field instead of specified DataTextField.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(31, 73, 125); "&gt;Please let us know whether this helps or not.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>how to select a value in webcombo 1 and autoshow the first result in webcombo 2</title><link>http://www.intersoftsolutions.com/Community/WebCombo/how-to-select-a-value-in-webcombo-1-and-autoshow-the-first-result-in-webcombo-2/</link><pubDate>Thu, 15 Nov 2012 06:19:23 GMT</pubDate><dc:creator>macedes</dc:creator><description>&lt;p&gt;Hello, &lt;span style="font-size: 10pt;"&gt;i have 2 webcombos and a webgrid.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 10pt;"&gt;the first webcombo has the same sqldatasource as the second webcombo.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;the difference between them two is, that i can select in the first webcombo the name and in the second webcombo i can select the tel number. &lt;/p&gt;
&lt;p&gt;what i want is that when i select a tel nr. in the second webcombo the first should show me the name which belongs to the number. and the other way too. &lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 10pt;"&gt;i am using the webcombos in the webgrid to add data in the table. &amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;is that possible? &lt;/p&gt;
&lt;p&gt;Thanks in advance for your help&lt;/p&gt;</description></item></channel></rss>