Gridview itemTemplate control enable/disable using jQuery
<p>here is my code in asp.net... when it renders the code i have a <code>[checkbox]</code> with <code>[dropdownlist]</code> by default all the dropdownlist disabled when the page loads by doing like this:</p>

<pre><code>var $ddls = $('select');
$ddls.prop("disabled", true); 
</code></pre>

<p><strong>my question</strong> is: how to enabled the dropdown only when the checkbox is checked? and if the checkbox is unchecked then disabled the dropdown </p>

<pre><code>&lt;asp:GridView ID="routePlanGridView" runat="server" AutoGenerateColumns="False" 

    &lt;Columns&gt;          
         &lt;asp:TemplateField HeaderText="Reason"&gt;
        &lt;ItemTemplate&gt; 
            &lt;div class="selectreason"&gt;
                &lt;asp:CheckBox CssClass="selectme" ID="chkReject" runat="server" Checked="false"&gt;
                &lt;/asp:CheckBox&gt;
                &lt;asp:DropDownList runat="server" ID="detail" &gt;
                    &lt;asp:ListItem Selected="True" Value="0"&gt;Select me&lt;/asp:ListItem&gt;
                    &lt;asp:ListItem Value="1"&gt;one&lt;/asp:ListItem&gt;
                    &lt;asp:ListItem Value="2"&gt;two&lt;/asp:ListItem&gt;
                    &lt;asp:ListItem Value="3"&gt;three&lt;/asp:ListItem&gt;
                    &lt;asp:ListItem Value="4"&gt;four&lt;/asp:ListItem&gt;
                &lt;/asp:DropDownList&gt;
            &lt;/div&gt;
        &lt;/ItemTemplate&gt; 
    &lt;/asp:TemplateField&gt;

    &lt;/Columns&gt;
&lt;/asp:GridView&gt;
</code></pre>
