validate dropdown if checkbox checked inside gridview
<pre><code>&lt;asp:GridView ID="gvAttributes" runat="server" 
              AutoGenerateColumns="false" EnableModelValidation="True" 
              CssClass="GridViewStyle" onrowdatabound="gvAttributes_RowDataBound"&gt;
  &lt;Columns&gt;
    &lt;asp:TemplateField HeaderText="Select"&gt;
      &lt;ItemTemplate&gt;
        &lt;asp:CheckBox ID="cbxAttributescheck" runat="server" Text=''
        &lt;%# Eval("AttributeName") %&gt; AutoPostBack="true" OnCheckedChanged="cbxAttributescheck_CheckedChanged"/&gt;
        &lt;asp:HiddenField ID="hdnAttributeValue" runat="server" Value=''
        &lt;%# Eval("AttributeID") %&gt;' /&gt;
        &lt;asp:Label ID="lblDelete" runat="server" Text=''
          &lt;%# Eval("AttributeID") %&gt;'   Visible="false"&gt;&lt;/asp:Label&gt;
      &lt;/ItemTemplate&gt;
    &lt;/asp:TemplateField&gt;
    &lt;asp:TemplateField HeaderText="Data Type" &gt;
      &lt;ItemTemplate&gt;
        &lt;asp:DropDownList ID="ddlAttributesDataType" runat="server"&gt;
        &lt;/asp:DropDownList&gt;
        &lt;asp:RequiredFieldValidator ID="rfvAttributeType" runat="server" 
                                    ErrorMessage="*"  Enabled="false" 
                                    ControlToValidate="ddlAttributesDataType" InitialValue="0"&gt;
        &lt;/asp:RequiredFieldValidator&gt;
      &lt;/ItemTemplate&gt;
    &lt;/asp:TemplateField&gt;
    &lt;asp:TemplateField HeaderText="Allow Nulls" &gt;
      &lt;ItemTemplate&gt;
        &lt;asp:CheckBox ID="cbxAttributesisnull" runat="server" /&gt;
      &lt;/ItemTemplate&gt;
    &lt;/asp:TemplateField&gt;
  &lt;/Columns&gt;
&lt;/asp:GridView&gt;

protected void cbxAttributescheck_CheckedChanged(object sender, EventArgs e)
{
    CheckBox cbx = (CheckBox)sender;
    string CurrentCbxId = ((CheckBox)sender).ClientID;
    foreach (GridViewRow Row in gvAttributes.Rows)
    {
        if (((CheckBox)Row.FindControl("cbxAttributescheck")).ClientID.Equals(CurrentCbxId) &amp;&amp; cbx.Checked)
        {
            RequiredFieldValidator rfvAttributeType = (RequiredFieldValidator)Row.FindControl("rfvAttributeType");
            rfvAttributeType.Enabled = true;
        }
    }
}
</code></pre>

<p>I have took grid view as above I want to enable the required field validator for drop down when check box is checked. I want to do this server side not through JavaScript.  I tried but unable to work out. I tried to enable the validator when check box checked else it will be disabled. I need assistance on this.</p>
