title: How to validate Textbox when Checkbox is checked in RadGrid using JavaScript
body: <p>How do you validate a textbox when a checkbox is checked in a RadGrid using JavaScript? 
  I tried to use the CheckBox_CheckedChanged event but it is not working. Please tell me how to validate if the textbox is empty or not when a checkbox is checked in a RadGrid in ASP.NET.</p>
  
  <p>C#:</p>
  
  <pre><code>protected void CheckBox1_CheckedChanged1(object sender, EventArgs e)
  {           
      foreach (GridDataItem item in radGridSahreaJob.MasterTableView.Items)
      {
          TextBox txtMaxResumes = (TextBox)item.FindControl("txtMaxResumes");
          CheckBox chkBox = (CheckBox)item.FindControl("chkIsCandidateSelected");              
          string str = txtMaxResumes.Text;
          if (chkBox.Checked &amp;&amp; string.IsNullOrEmpty(str))
          {
              ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "alert", "getMessagetest('ShareaJob');", true);
          }
      }
  }
  </code></pre>
  
  <p>ASP.NET:</p>
  
  <pre><code>&lt;Columns&gt;
      &lt;telerik:GridTemplateColumn UniqueName="chkSelect" lowFiltering="false"&gt;
          &lt;HeaderTemplate&gt;
              &lt;asp:CheckBox ID="chkSelectAll" runat="server" OnClick="return SelectAllCandidates(this);" /&gt;
          &lt;/HeaderTemplate&gt;
          &lt;ItemTemplate&gt;
              &lt;asp:CheckBox ID="chkIsCandidateSelected" runat="server" OnClick="return CandidateRowChecked();" AutoPostBack="True" oncheckedchanged="CheckBox1_CheckedChanged1"/&gt;
          &lt;/ItemTemplate&gt;                                
      &lt;/telerik:GridTemplateColumn&gt;
      &lt;telerik:GridTemplateColumn HeaderText="Max.Resume(s) &amp;nbsp;can upload" HeaderStyle-HorizontalAlign="Center" ShowFilterIcon="false" AllowFiltering="false"&gt;
          &lt;ItemTemplate&gt;
              &lt;asp:TextBox ID="txtMaxResumes" runat="server" CssClass="rgf_txt_area_l2" Text="3" Width="80px" MaxLength="2"&gt;
              &lt;/asp:TextBox&gt;
          &lt;/ItemTemplate&gt;
      &lt;/telerik:GridTemplateColumn&gt;
  &lt;/Columns&gt;
  </code></pre>
  
  <p>JavaScript:</p>
  
  <pre><code> function getMessagetest(entity) {
       if (entity == 'ShareaJob') {
           radalert("Please enter number !", 370, 150, "Alert");
       }
   }
  </code></pre>