How to set the non duplicate selected value in dropdownlist
<p>I have a table with multiple rows. Each row has a dropdownlist. The user cannot select two same options from a dropdownlist in each row. Meaning if the user selects option A from the dropdownlist in row 1 he/she cannot selected Option A from the dropdownlist in row 2 or 3 or any other row. </p>

<p>I simply select the first item in the list but of course this will not work: </p>

<pre><code>function isSelectedOptionValid(selectedOption) {

    var isValid = true; 
    var rows = $(selectedOption).parent().parent().siblings(".TBLCONTENTS");
    var tds = rows.find("td");

    for(i=0;i&lt;rows.length;i++) {

        var option = $($($(rows[i]).find("td")[1]).find("select")[0]).val();

        if (option == $(selectedOption).val()) {

            // find the option that is not selected 
            $(selectedOption).children(":first").attr("selected", "selected");

            isValid = false;
            break;
        }
    }

    return isValid;

}
</code></pre>
