title: How to enable and disable checkbox from one gridview to another gridview in asp.net?
body: <p>I want to disable the CheckBox when it is already selected.I used two gridview for two pages(admin page and faculty page).When I select a checkbox from one gridview(i.e admin page),it should disable that particular checkbox in other gridview(i.e faculty page). I stored that gridview(admin page) values as bool type(True and False) in database.When the checkbox is selected from admin page it will store value as "True" and vice versa.Then I used that values to retrieve from database, now I want use the query for checking the checkbox values and to disable the checkbox which is selected from gridview(admin page).This is the code I tried</p>
  
  <pre><code>     protected void createbtnclick_Click(object sender, EventArgs e)
      {
          using (SqlConnection con1 = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
          {
              con1.Open();
              SqlDataAdapter cmd1 = new SqlDataAdapter("select * from test where hour1='true' or hour2='true' or hour3='true' or hour4='true' or hour5='true' ", con1);
              DataTable dt = new DataTable("dt");
              cmd1.Fill(dt);
              Gv1.DataSource = dt;
              Gv1.DataBind();
          }
      }
  </code></pre>