﻿<?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 - Lounge - How to use WebCombo event OnBeforeItemSelected on client side</title><link>http://www.intersoftsolutions.com/Community/Lounge/How-to-use-WebCombo-event-OnBeforeItemSelected-on-client-side/</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 use WebCombo event OnBeforeItemSelected on client side</title><link>http://www.intersoftsolutions.com/Community/Lounge/How-to-use-WebCombo-event-OnBeforeItemSelected-on-client-side/</link><pubDate>Mon, 16 Mar 2015 01:38:16 GMT</pubDate><dc:creator>yudi</dc:creator><category>WebCombo</category><description>&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Glad to hear that the snippet code of OnBeforeItemSelected posted on March 12, 2015 helps.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&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>How to use WebCombo event OnBeforeItemSelected on client side</title><link>http://www.intersoftsolutions.com/Community/Lounge/How-to-use-WebCombo-event-OnBeforeItemSelected-on-client-side/</link><pubDate>Thu, 12 Mar 2015 15:58:35 GMT</pubDate><dc:creator>mmikaeel@hotmail.com</dc:creator><category>WebCombo</category><description>Thanks, that worked fine.</description></item><item><title>How to use WebCombo event OnBeforeItemSelected on client side</title><link>http://www.intersoftsolutions.com/Community/Lounge/How-to-use-WebCombo-event-OnBeforeItemSelected-on-client-side/</link><pubDate>Thu, 12 Mar 2015 03:21:17 GMT</pubDate><dc:creator>yudi</dc:creator><category>WebCombo</category><description>&lt;p&gt;&lt;span style="color: #1f497d;"&gt;I modified my sample based on the following information:&lt;/span&gt;&lt;/p&gt;&lt;blockquote&gt;... I want to check first if the user saved the current view...&lt;/blockquote&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;In order to emulate such condition, I added a checkbox and do checking: if checkbox.checked is true then...&lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;... cancel the combo selection from the user and stay with the original selection.&lt;/blockquote&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;In the following snippet code, I use OnBeforeRequest client-side event to save original selection of WebCombo in a variable. In OnBeforeItemSelected, check the checked state of my checkboxDummy. If true, cancel the combo selection and restore the original selection.&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;var wcProductsOriginalSelection = "";

function wcProducts_OnBeforeRequest(controlId, action)
{
    var wcProducts = ISGetObject(controlId);
            
    if (action == "LoadData")
    {                
        // save wcProducts original selection to global variable
        wcProductsOriginalSelection = wcProducts.Text;
    }

    return true;
}

function wcProducts_OnBeforeItemSelected(controlId, selectedText, selectedValue)
{
    var wcProducts = ISGetObject(controlId);

    if (document.getElementById("checkboxDummy").checked)
    {
        // cancel the WebCombo selection
        wcProducts.ClearSelection();

        // restore the original selection
        wcProducts.SetText(wcProductsOriginalSelection);
    }

    return true;
}&lt;/pre&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Hope this helps.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>How to use WebCombo event OnBeforeItemSelected on client side</title><link>http://www.intersoftsolutions.com/Community/Lounge/How-to-use-WebCombo-event-OnBeforeItemSelected-on-client-side/</link><pubDate>Wed, 11 Mar 2015 17:21:15 GMT</pubDate><dc:creator>mmikaeel@hotmail.com</dc:creator><category>WebCombo</category><description>&lt;p&gt;Thanks for your reply.&lt;/p&gt;&lt;p&gt;This is may not what I'm looking for.&lt;/p&gt;&lt;p&gt;When the user trying to select a combo box item, I want to check first if the user saved the current vew, if not I want to stay in the same view, and cancel the combo selection from the user and stay with the original sselection.&lt;/p&gt;&lt;p&gt;I need your help to do that, how to cancel the user selection?&lt;/p&gt;</description></item><item><title>How to use WebCombo event OnBeforeItemSelected on client side</title><link>http://www.intersoftsolutions.com/Community/Lounge/How-to-use-WebCombo-event-OnBeforeItemSelected-on-client-side/</link><pubDate>Wed, 11 Mar 2015 03:45:53 GMT</pubDate><dc:creator>yudi</dc:creator><category>WebCombo</category><description>&lt;p&gt;&lt;span style="color: #1f497d;"&gt;I created a simple page and added two instances of WebCombo; then specify the name as WebComboSuppliers and WebComboProducts respectively.  In OnBeforeItemSelected client-side event of WebComboProducts, the selected value of WebComboSuppliers is evaluated. If WebComboSuppliers's value is &lt;strong&gt;1&lt;/strong&gt;, then cancel the selection.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Following snippet code shows how to do this using OnBeforeItemSelected.&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;function wcProducts_OnBeforeItemSelected(controlId, selectedText, selectedValue)
{
    var wcProducts = ISGetObject(controlId);
    var wcSuppliers = ISGetObject("wcSuppliers");
            
    if (wcSuppliers.Value == "1")
        wcProducts.ClearSelection();

    return true;
}&lt;/pre&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Hope this helps.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>How to use WebCombo event OnBeforeItemSelected on client side</title><link>http://www.intersoftsolutions.com/Community/Lounge/How-to-use-WebCombo-event-OnBeforeItemSelected-on-client-side/</link><pubDate>Tue, 10 Mar 2015 21:56:58 GMT</pubDate><dc:creator>mmikaeel@hotmail.com</dc:creator><category>WebCombo</category><description>&lt;p&gt;Hi There,&lt;/p&gt;&lt;p&gt;&amp;nbsp; I've WebCombo 6. I want to handle&amp;nbsp;OnBeforeItemSelected event and cancel the selection in some kind of cases.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 10pt;"&gt;Thanks,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Maged&lt;/p&gt;</description></item></channel></rss>